SIA-R19aria-*
states and properties have a valid value
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that ARIA states and properties have a valid value.
Applicability
This rule applies to every attribute with a value that is not empty (""
), 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 has a value that is allowed by the value type of the corresponding state or property.
Additionally, if the attribute is required on the role of its owner, and the value type is ID reference or ID reference list, then the document tree or shadow tree of the owner of the target attribute contains at least one element whose ID matches one of the tokens in the value of the attribute.
Assumptions
This rule makes no assumptions.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Passed
This aria-required
property has a valid value according to its value type of true/false and therefore passes the rule:
<div role="textbox" aria-required="true" aria-label="A required textbox"></div>
Failed
This aria-required
property does not have a valid value according to its value type of true/false and therefore fails the rule:
<div
role="textbox"
aria-required="undefined"
aria-label="A required textbox"
></div>
This aria-controls
property, which is a required property for the role scrollbar
, references an element that does not exist in the same document tree.
<div
role="scrollbar"
aria-controls="content"
aria-orientation="vertical"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="25"
></div>
Inapplicable
This element does not have any WAI-ARIA states or properties and is therefore inapplicable:
<div>Some Content</div>
Implementation details
While aria-controls
is required on the role of combobox
in ARIA 1.2, it is not anymore in ARIA 1.3 (unless the combobox is expanded), and the WAI-ARIA authoring practice for combobox only requires it on open comboboxes. Therefore, Alfa does not check the validity of ID ref list for aria-controls
on a combobox
.
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/6a7281/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).