Ensures ARIA Attributes Are Not Prohibited for An Elements Role

Photo of Researcher
Yotam Flohr
Researcher
Blind Low vision Hearing Mobility
WCAG 2.1 Level A

Written and researched for humans by humans

Photo of Researcher
Yotam Flohr
Researcher
Photo of Expert
Ritvik Shrivastava
Expertly reviewed by
Comments: 0
Your entire domain
Get detailed instructions on how to resolve every accessibility issue on your website

Not all ARIA role-attribute combinations are valid. It’s important that none of the attributes used with a particular role are listed as “prohibited” for that role in the latest version of WAI-ARIA.

Why It Matters

When ARIA attributes in roles where they are prohibited are used, essential information won’t be accessible to certain users who rely on assistive technologies. Some technologies may also try to compensate for the issues, resulting in confusing behavior.

Fixing the Issue

Developers should make sure that each ARIA attribute used is not described as prohibited for that element’s role in WAI-ARIA specifications.

Only if the information being conveyed is not important should the attribute be ignored. However, 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.

Test Cases

For further examples, visit W3C’s GitHub’s ATC Rules library