Skip to content

Roles need to be current, not deprecated

  • Rule: axe/aria-deprecated-role
  • Checks: Deprecated ARIA roles must not be used
  • WCAG: 4.1.2
  • Fix class: mechanical: A fix needs no authored text or visual decision.
  • People who use a screen reader or a braille display, most of them blind.

Use a list instead: <ul> or <ol> with <li> items, or role="list" and role="listitem" where native lists cannot be used. ARIA deprecated directory because assistive technology exposes it as a plain list anyway.

<nav aria-label="On this page">
<ul>
<li><a href="#setup">Setup</a></li>
<li><a href="#usage">Usage</a></li>
</ul>
</nav>

An element has role="doc-biblioentry" or role="doc-endnote"

Section titled “An element has role="doc-biblioentry" or role="doc-endnote"”

Remove the role and make each entry a list item inside the doc-bibliography or doc-endnotes section. The section role already says what the items are, and the list gives people the count.

<section role="doc-endnotes" aria-labelledby="notes-heading">
<h2 id="notes-heading">Notes</h2>
<ol>
<li id="note-1">First published in 1998.</li>
<li id="note-2">Revised for the second edition.</li>
</ol>
</section>

Deleting the role without restoring a list

Section titled “Deleting the role without restoring a list”

Entries left as loose <p> or <div> elements lose the item count and boundaries that a list gives screen reader users.

axe-core’s documentation of the rule

CORA’s fix guidance adapts content from accessibility-agents, under the MIT License: see its notice.