Elements must only use permitted ARIA attributes
How to Fix the Problem
Prohibited attributes are often used in an attempt to communicate information that then ends up ignored by screen readers and other assistive technologies. If the information conveyed is not important, the attribute can be ignored. More commonly though the information will need to be communicated, so instead of removing the prohibited attribute, consider one of the following:
- Change the role to one on which the attribute is not prohibited
- Provide the information as text in the page.
- Move the attribute to a different element that does support it.
Why it Matters
Using ARIA attributes in roles where they are prohibited can mean that important information is not communicated to users of assistive technologies. assistive technologies may also attempt to compensate for the issue, resulting in inconsistent and confusing behavior of these tools.
Rule Description
Not all ARIA role-attribute combinations are valid. This Rule checks that noe of the attributes used with a particular role are listed as "prohibited" for that role in the latest version of WAI-ARIA.
The aria-label and
aria-labelledby attributes are prohibited on
presentation
and none
roles, as well as on text-like
roles such as code
, insertion
, strong
,
etc.
The Algorithm (in simple terms)
Check that each ARIA attribute used is not described as prohibited for that element's role in the WAI-ARIA specification .