Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aria-state-or-property-permitted-5c01ea.md #1612

Merged
merged 10 commits into from
Jun 24, 2021
27 changes: 25 additions & 2 deletions _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ This rule applies to any [WAI-ARIA state or property][] that is specified on an

## Expectation

Each test target is either an [inherited][], [supported][], or [required][] [state][] or [property][] of the [semantic role][] of the element on which the attribute is specified. If the element has no [semantic role][], the attribute must be a [global state or property][global].
One of the following is true for each test target:
ajanec01 marked this conversation as resolved.
Show resolved Hide resolved

**Note:** Assessing the value of the attribute is out of scope for this rule.
- **Global**: the test target is a [global state or property][global]; or
- **Semantic Role**: the test target is an [inherited][], [supported][], or [required][] [state][] or [property][] of the [semantic role][] of the element on which the test target is specified; or
- **language feature**: for an HTML element, the test target is allowed on the element on which it is specified. Which ARIA state or property may be used on which element is described in [ARIA in HTML](https://w3c.github.io/html-aria/).
Jym77 marked this conversation as resolved.
Show resolved Hide resolved
ajanec01 marked this conversation as resolved.
Show resolved Hide resolved

## Assumptions

Expand All @@ -46,12 +48,17 @@ Implementation of [Presentational Roles Conflict Resolution][] varies from one b

## Background

In HTML, there are language features that do not have corresponding implicit WAI-ARIA semantics. As per [ARIA in HTML Editor's Draft](https://w3c.github.io/html-aria/), those elements can have [global states or properties][global]. Some of those elements can also have [inherited][], [supported][], or [required][] [states][state] or [properties][property] that correspond to a [WAI-ARIA role](https://www.w3.org/TR/wai-aria-1.1/#usage_intro). For example, `audio` has no corresponding ARIA semantics but it can have [inherited][], [supported][], or [required][] [states][state] or [properties][property] of the [`application` role](https://www.w3.org/TR/wai-aria-1.1/#application).
Jym77 marked this conversation as resolved.
Show resolved Hide resolved

Assessing the value of the attribute is out of scope for this rule.

- [ARIA state or property has valid value](https://act-rules.github.io/rules/6a7281)
- [Understanding Success Criterion 4.1.1: Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)
- [WAI-ARIA 1.1, Supported States and Properties](https://www.w3.org/TR/wai-aria-1.1/#states_and_properties)
- [WAI-ARIA 1.1, Global States and Properties](https://www.w3.org/TR/wai-aria-1.1/#global_states)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA5)
- [Document conformance requirements for use of ARIA attributes in HTML](https://w3c.github.io/html-aria/#docconformance)
Jym77 marked this conversation as resolved.
Show resolved Hide resolved

## Test Cases

Expand Down Expand Up @@ -139,6 +146,14 @@ This `button` element has an [explicit role][] of `none`. However, it is [focusa
<button role="none" aria-pressed="false">ACT rules are cool!</button>
```

#### Passed Example 11

This `input` element does not have an [explicit role][] of `textbox`, but the `aria-required` property may be used on such language feature.
ajanec01 marked this conversation as resolved.
Show resolved Hide resolved

```html
<label>Password<input type="password" aria-required="true" /></label>
```

### Failed

#### Failed Example 1
Expand All @@ -149,6 +164,14 @@ The `aria-sort` [property][] is neither [inherited][], [supported][], nor [requi
<button aria-sort="">Sort by year</button>
```

#### Failed Example 2

The `aria-orientation` property may not be used on `audio` element, nor it can be used on `application` (the [semantic role][] for which [inherited][], [supported][], or [required][] [states][state] or [properties][property] are also applicable to `audio` element).

```html
<audio src="/test-assets/moon-audio/moon-speech.mp3" controls aria-orientation="horizontal" ></audio>
```

### Inapplicable

#### Inapplicable Example 1
Expand Down