Role attribute has valid value
This rule checks that each role attribute has a valid value
This conformance rule relates to:
Note: Having a whitespace separated list of more than one token in the value of the role attribute is used for what is known as fallback roles. If the first token is not accessibility supported (or valid), the next one will be used for determining the semantic role of the element, and so forth.
Each test target has a valid value that corresponds to a non-abstract WAI-ARIA role.
Note: Which specific roles to consider may depend on the type of content under test, such as web pages or digital publications, and are not limited to those defined by WAI-ARIA alone. Roles defined in separate WAI-ARIA modules, such as the Digital Publishing Module or the Graphics Module, may also be considered for this rule.
There are currently no assumptions
Older browsers do not support more than one token in the value for a role attribute. If multiple values are used in the role attribute, the attribute is ignored in these browsers.
Element with valid
Element with multiple valid
Element with at least one valid
Element with invalid
Element with multiple invalid
Element with empty
Element does not have
Element with null
Element that is not included in the accessibility tree.
Elements included in the accessibility tree of platform specific accessibility APIs. Elements in the accessibility tree are exposed to assistive technologies, allowing users to interact with the elements in a way that meet the requirements of the individual user.
The general rules for when elements are included in the accessibility tree are defined in the core accessibility API mappings. For native markup languages, such as HTML and SVG, additional rules for when elements are [included in the accessibility tree] can be found in the HTML accessibility API mappings and the SVG accessibility API mappings.
Note: Users of assistive technologies might still be able to interact with elements that are not included in the accessibility tree. An example of this is a focusable element with an
aria-hiddenattribute with a value of
true. Such an element could still be interacted with using sequential keyboard navigation regardless of the assistive technologies used, even though the element would not be included in the accessibility tree.
A string of characters (text) is considered “non-empty” if it contains 1 or more characters that are contained within any of the following unicode categories:
For more details on unicode categories, check out www.fileformat.info/info/unicode/category/
A semantic role is a semantic association that indicates an object’s type. This allows tools to present and support interaction with the object in a manner that is consistent with user expectations about other objects of that type.
The role attribute takes a list of tokens. The semantic role is the first valid role in this list. If none of the tokens are valid, the implicit role will be used instead.
Non-abstract roles defined in the following specifications are considered valid:
Other roles may be added as they become available. Not all roles will be supported in all assistive technologies. Testers are encouraged to adjust which roles are allowed according to the accessibility support base line. For the purposes of executing test cases in all rules, it should be assumed that all roles are supported by assistive technologies so that none of the roles fail due to lack of accessibility support.
Note: For HTML elements the implicit roles are documented in ARIA in HTML.
Contributing is open to anyone. We welcome any new issues or pull requests for changes. Auto WCAG Rules has conference calls every 4 weeks. If you are interested in becoming an active contributor or reviewer, we ask that you join the Auto WCAG Rules community group through the W3C Website. This requires setting up a W3C account, may require approval by the organization you work for if they are a W3C member.Learn more about contributing to Auto WCAG Rules Join the Auto WCAG Rules community group now!