SIA-R18aria-*
states and properties are allowed
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that ARIA states and properties are allowed by the element on which they are specified.
Applicability
This rule applies to every attribute specified on an element included in the accessibility tree, where the name of the attribute corresponds to a WAI-ARIA state or property.
Expectations
-
The attribute is either:
-
(global) a global state or property; or
-
(semantic role) an inherited, supported, or required state or property of the semantic role of the element on which it is specified; or
-
(language feature) 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
-
-
The attribute is not a prohibited state or property of the semantic role of the element on which it is specified.
Assumptions
This rule makes no assumptions.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Passed
The aria-pressed
state is supported for the button
role:
<button aria-pressed="false">My button</button>
The global state aria-busy
is supported by all base markup elements:
<div aria-busy="true">My busy button</div>
This <input>
element does not have any semantic role, but the aria-required
property may be used on an <input>
element whose type
attribute is in the Password state.
<label>Password<input type="password" aria-required="true" /></label>
Failed
The aria-sort
property is neither supported, inherited nor required for the button
role:
<button aria-sort="ascending">Sort by year</button>
The aria-label
property is prohibited for the generic
role:
<div aria-label="Hello">Good morning.</div>
Inapplicable
This element has no WAI-ARIA state or property:
<div role="region">A region of content</div>
This element is not included in the accessibility tree:
<button aria-sort="ascending" aria-hidden="true">Sort by year</button>
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/5c01ea/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).