SIA-R16Elements with a role have required states and properties
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that elements that have a role also specify all required states and properties for that role.
Applicability
This rule applies to every element in the HTML or SVG namespace that has an explicit semantic role which is different from its implicit semantic role.
Expectations
- The element specifies all required states and properties of its semantic role.
Assumptions
This rule makes no assumptions.
Accessibility support
This rule has no known accessibility support concerns.
Background
Mapping of ARIA states of property from native elements is the responsibility of the user agent, not of the author. This rule is intended to check correct implementation of ARIA semantics by authors, not by user agents.
Examples
Passed
This element with a role of checkbox
has the required property aria-checked
and therefore passes the rule:
<div role="checkbox" aria-checked="false"></div>
Failed
This element with a role of combobox
is missing the required aria-controls
property and therefore fails the rule:
<div role="combobox" aria-expanded="true"></div>
Inapplicable
This element has no role and is therefore inapplicable:
<div></div>
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/4e8ab6/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).