Deprecated ARIA roles were used

How to fix the aria-deprecated-role accessibility rule. ARIA.

The message you saw

Lighthouse and PageSpeed Insights
Deprecated ARIA roles were used
axe-core, axe DevTools and this checker
Deprecated ARIA roles must not be used (rule aria-deprecated-role)

Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.

What it means

Over time the ARIA standards have retired a few roles. Browsers and screen readers may stop supporting them, so a page that still uses them can lose meaning without any change on your side. This message means an element uses one of those retired roles.

In axe-core 4.14 the deprecated roles are directory (retired in WAI-ARIA 1.2; use list) and, from the digital publishing roles, doc-biblioentry and doc-endnote (use listitem inside a list with doc-bibliography or doc-endnotes).

Who is affected

The element uses an ARIA role that has been retired (directory, doc-biblioentry, doc-endnote), and support for it is fading.

Screen-reader users, as support for the old role fades: the element can end up announced as plain text with no structure.

How to find it

  1. Run the checker on the page: the report names the element and the role.
  2. Search your code for role="directory", doc-biblioentry and doc-endnote. They are most common in older templates and in e-book or academic publishing tools.

How to fix it

  1. Replace role="directory" with a native list (<ul> or <ol>), or with role="list" and role="listitem" children.
  2. For bibliographies and endnotes, use a list of <li>s inside the element with role="doc-bibliography" or role="doc-endnotes".
  3. Run the check again.

Example

Before

<div role="directory">
  <a href="#intro">Introduction</a>
  <a href="#setup">Setup</a>
</div>

After

<ul>
  <li><a href="#intro">Introduction</a></li>
  <li><a href="#setup">Setup</a></li>
</ul>

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail