Appropriate ARIA roles for elements

Last updated:

How to fix incorrect ARIA roles?

Use a role that is allowed for the element, or use the correct semantic HTML element instead:

BAD:

role=“article” is not allowed on a <button> element

<button role="article">Submit</button>
CORRECT:

use the element that matches the intended role.

<button>Enable notifications</button>
<a href="/page">Go to page</a>

Check the ARIA in HTML specification for the list of allowed roles per element. When possible, prefer native HTML elements over adding ARIA roles. A <button> element already has an implicit role of button, so no role attribute is needed on it.

Why is this important?

Screen readers use the role to tell users what an element is. An incorrect role gives users wrong information about how to interact with the element. This can make parts of a page unusable for people relying on assistive technology.

More info:

WCAG 4.1.2 Name, Role, Value.

Rule info

Standard

Best practice

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.