Accessibility Insights

Back to Info and Examples for Accessibility Insights for Web

aria-deprecated-role

All values corresponding to ARIA roles must not be deprecated or abstract.

Why it matters

Using deprecated ARIA roles will make it so those elements aren’t recognized, and it won’t be correctly processed by screen readers or other assistive technology. As a result, people may not be able to access essential information.

How to fix

Consider using a list role instead, as it is the most equivalent role to the deprecated directory role.

Example

 

Fail

A div element has been given the role of directory, which is a deprecated role and should not be used by developers.
<div role="directory">
</div>
 

Pass

The div is meant to represent a list of content, so rather than the deprecated directory role, it is given a valid role of list
<div role="list">
</div>

About this rule

This rule passes if any of the values assigned to ARIA role attribute aren’t deprecated or abstract. Deprecated roles are roles which the ARIA spec no longer recommends that authors use, and abstract roles are specifically for user agent implementation, and must never used by web authors.

More examples