Deprecated ARIA roles were used
How to fix the aria-deprecated-role accessibility rule. ARIA.
The message you saw
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
- Run the checker on the page: the report names the element and the role.
- Search your code for
role="directory",doc-biblioentryanddoc-endnote. They are most common in older templates and in e-book or academic publishing tools.
How to fix it
- Replace
role="directory"with a native list (<ul>or<ol>), or withrole="list"androle="listitem"children. - For bibliographies and endnotes, use a list of
<li>s inside the element withrole="doc-bibliography"orrole="doc-endnotes". - 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:
- 4.1.2 Name, Role, Value (Level A, WCAG 2.0, 2.1, 2.2)
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
[role]values are not valid- Lists do not contain only
<li>elements [aria-*]attributes do not match their roles
More detail
- Deque University’s reference for aria-deprecated-role (the makers of axe-core, the engine our scanner uses)
- W3C’s Understanding 4.1.2
- All fix guides