Skip to content

Update permitted ARIA state or property for combobox role #2322

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
6 changes: 4 additions & 2 deletions _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ The presence of prohibited ARIA attributes is often the result of a developer us

In HTML, there are language features that do not have corresponding implicit WAI-ARIA semantics. As per [ARIA in HTML](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.2/#introroles). 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.2/#application).

Note that required WAI-ARIA states or properties for a role may change with the advance of the WAI-ARIA specifications. For example, both aria-expanded and aria-controls were required in [ARIA 1.2](<[https://](https://www.w3.org/TR/wai-aria-1.2/#combobox)https://>) for combobox role, but the aria-controls was removed from required states or properties in [ARIA 1.3](<[https://](https://www.w3.org/TR/wai-aria-1.3/#combobox)https://>). The examples in this rule follow [ARIA 1.3](<[https://](https://www.w3.org/TR/wai-aria-1.3/#combobox)https://>).

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

### Assumptions
Expand Down Expand Up @@ -137,15 +139,15 @@ The `aria-expanded` [property][] is [required][] for the [semantic][semantic rol
The `aria-expanded` [property][] is [required][] for the [semantic][semantic role] `combobox`.

```html
<div role="combobox" aria-expanded="true" aria-controls="id1">My combobox</div>
<div role="combobox" aria-expanded="false" aria-controls="id1" aria-label="My combobox">My combobox</div>
```

#### Passed Example 8

The `aria-expanded` [property][] is [required][] for the [semantic][semantic role] `combobox`. [WAI-ARIA states and properties][wai-aria state or property] with `undefined` value are still applicable to this rule.

```html
<div role="combobox" aria-expanded="undefined" aria-controls="id1">My combobox</div>
<div role="combobox" aria-expanded="undefined" aria-controls="id1" aria-label="My combobox">My combobox</div>
```

#### Passed Example 9
Expand Down