Skip to content

Commit

Permalink
Update aria-state-or-property-permitted-5c01ea.md (#1612)
Browse files Browse the repository at this point in the history
* Update aria-state-or-property-permitted-5c01ea.md

* Update aria-state-or-property-permitted-5c01ea.md

* Update aria-state-or-property-permitted-5c01ea.md

* Update _rules/aria-state-or-property-permitted-5c01ea.md

Co-authored-by: Jean-Yves Moyen <[email protected]>

* Update _rules/aria-state-or-property-permitted-5c01ea.md

Co-authored-by: Jean-Yves Moyen <[email protected]>

* Update _rules/aria-state-or-property-permitted-5c01ea.md

Co-authored-by: Wilco Fiers <[email protected]>

* Update aria-state-or-property-permitted-5c01ea.md

* Update aria-state-or-property-permitted-5c01ea.md

Co-authored-by: Jean-Yves Moyen <[email protected]>
Co-authored-by: Wilco Fiers <[email protected]>
  • Loading branch information
3 people authored Jun 24, 2021
1 parent 685eede commit 63bd0ea
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 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].
For each test target, one of the following is true:

**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**: the test target is specified on an HTML element and is allowed on that element. Which ARIA states or properties may be used on which element is described in [ARIA in HTML](https://w3c.github.io/html-aria/).

## 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://www.w3.org/TR/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, the `audio` element 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).

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://www.w3.org/TR/html-aria/#docconformance)

## 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 an `input` element with a `type` [attribute value][] of `password`.

```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 All @@ -167,6 +190,7 @@ This `div` element is not [included in the accessibility tree][], hence its [WAI
<div role="button" aria-sort="" style="display:none;"></div>
```

[attribute value]: #attribute-value 'Definition of attribute value'
[explicit role]: #explicit-role 'Definition of Explicit Role'
[focusable]: #focusable 'Definition of focusable'
[global]: https://www.w3.org/TR/wai-aria-1.1/#global_states 'Definition of Global ARIA States and Properties'
Expand Down

0 comments on commit 63bd0ea

Please sign in to comment.