Valid ARIA attributes for element roles

Last updated:

How to use only allowed ARIA attributes?

Check which ARIA attributes are permitted for the role you are using. Below are correct examples:

<!-- role="checkbox" allows aria-checked -->
<div role="checkbox" aria-checked="false">Accept terms</div>

<!-- role="listbox" allows aria-multiselectable -->
<ul role="listbox" aria-multiselectable="true">
  <li role="option" aria-selected="false">Option A</li>
  <li role="option" aria-selected="true">Option B</li>
</ul>

<!-- role="slider" allows aria-valuemin, aria-valuemax, aria-valuenow -->
<div role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="50">Volume</div>

The following is incorrect because aria-checked is not allowed on a role="link":

BAD:
<a href="/page" role="link" aria-checked="true">Page</a>

Why is this important?

Screen readers rely on ARIA attributes to describe the state and properties of elements. When an attribute is not valid for a given role, assistive technology may ignore it or produce confusing output.

Use the WAI-ARIA specification to find the supported attributes for each role.

More info:

WCAG 4.1.2 Name, Role, Value.

Rule info

Standard

WCAG A SC 4.1.2

Regulations

EN 301 549 RGAA EAA AODA

User impact

Fix complexity

Affects

Was this article helpful?

Checkout the ExcellentWebCheck services

ExcellentWebCheck's goal is to improve the online user experience. The tools of ExcellentWebCheck help to detect and improve usability problems on your website.