Features

Make sure elements do not use deprecated roles

Rule ID: aria-deprecated-role User Impact: minor Guidelines: WCAG 2.0

About This A11Y Rule

This rule ensures that ARIA role attributes do not use deprecated or abstract values. Deprecated roles are those that the ARIA specification no longer recommends. Abstract roles are intended for user agent implementation and must not be used by web developers.

Why It Matters

Using deprecated ARIA roles can cause elements to be unrecognized by assistive technologies, leading to accessibility issues. This may prevent users from accessing essential information.

How to Fix

Replace deprecated roles with their modern equivalents. For example, use the list role instead of the deprecated directory role.

Example

Fail

The following example uses the deprecated directory role:

Copy code
<div role="directory">
  ...
</div>

Pass

In this corrected example, the valid list role is used:

Copy code
<div role="list">
  ...
</div>

Other Rules

Interested in other web accessibility rules? Please see these other rules: