10 ARIA Mistakes That Break Accessibility
ARIA (Accessible Rich Internet Applications) adds roles and states that tell assistive technology what custom components are and what they are doing. Used well, it fills gaps that HTML cannot. Used badly, it makes a page worse than having no ARIA at all. The ten mistakes below are the ones that appear most often, each with bad and good code.
The W3C's guidance puts it simply: the first rule of ARIA is to use a native HTML element when one exists with the meaning and behavior you need. The ARIA Authoring Practices Guide adds that no ARIA is better than bad ARIA.
Mistake 1: Why is using ARIA instead of native HTML a problem?
A native element gives you the role, keyboard behavior, focus and states for free. A div with ARIA gives you only the label, and you have to build everything else.
Bad:
<div role="button" tabindex="0" onclick="save()">Save</div>
Good:
<button type="button" onclick="save()">Save</button>
The div version does not respond to Space, and needs extra script for Enter. The button works with both, and has the right role without help. Native elements also satisfy 4.1.2 Name, Role, Value with no extra work.
Mistake 2: What happens when a custom control has a role but no keyboard support?
Adding role="button", role="tab" or role="checkbox" changes what a screen reader announces. It does not add behavior. If you build a custom control, it must also be focusable and work with the keys users expect (2.1.1 Keyboard).
Bad:
<span role="checkbox" aria-checked="false">Subscribe</span>
Good:
<label>
<input type="checkbox" name="subscribe"> Subscribe
</label>
If a native element will not do, add tabindex="0", key handlers for Space or Enter and the matching aria-checked updates.
Mistake 3: Why does aria-label on a div or span often fail?
aria-label is for interactive elements and landmarks that have a role. On a plain div or span, with no role, it is not reliably announced, and the ARIA specification prohibits naming those generic elements.
Bad:
<div aria-label="Product price">$29</div>
Good:
<p>Product price: <strong>$29</strong></p>
If you need to add context, put it in visible or visually hidden text, or give the element a proper role.
Mistake 4: What goes wrong when the aria-label does not match the visible text?
Voice control users activate buttons by saying what they see. If the accessible name differs from the visible label, they may not be able to. This fails 2.5.3 Label in Name, which asks that the accessible name contains the visible text.
Bad:
<button aria-label="Submit your order now">Buy</button>
Good:
<button type="button">Buy</button>
If you do need a longer name, start with the visible text: aria-label="Buy: Blue mug", for a visible "Buy" label.
Mistake 5: Are redundant or conflicting roles a problem?
Redundant roles add noise. Conflicting roles break meaning.
Redundant:
<button role="button">Save</button>
<nav role="navigation">...</nav>
Conflicting, which turns a heading into a button and drops the heading from the outline:
<h2 role="button">Details</h2>
Good, a native heading with a button inside it:
<h2><button type="button" aria-expanded="false">Details</button></h2>
Remove roles that repeat what the element already is, and avoid overriding the role of structural elements such as headings, lists and tables.
Mistake 6: What is wrong with aria-hidden on the wrong things?
aria-hidden="true" removes an element from the accessibility tree. It does not stop it from receiving keyboard focus, so a focusable element inside a hidden container becomes a ghost: users can tab to it, but a screen reader says nothing.
Bad:
<div aria-hidden="true">
<a href="/offers">See offers</a>
</div>
Good, for decorative content only:
<svg aria-hidden="true" focusable="false" width="16" height="16">...</svg>
Never put aria-hidden="true" on an element that contains links, buttons or fields. When you hide something visually from everyone, such as a closed menu, use hidden, display: none or the inert attribute so it is removed from both sight and keyboard order.
Mistake 7: What is wrong with role="menu" on site navigation?
The ARIA menu role is for application-style menus, like a desktop app's File menu, with specific arrow key behavior. It is not for website navigation. Using it for ordinary links changes how screen readers handle the list and leads users to expect keys that you have not built.
Bad:
<ul role="menu">
<li role="menuitem"><a href="/about">About</a></li>
</ul>
Good:
<nav aria-label="Main">
<ul>
<li><a href="/about">About</a></li>
<li>
<button type="button" aria-expanded="false" aria-controls="sub-products">Products</button>
<ul id="sub-products" hidden>...</ul>
</li>
</ul>
</nav>
A list of links inside a nav, with disclosure buttons for submenus, is simpler and more reliable.
Mistake 8: What happens when states are never updated?
States such as aria-expanded, aria-selected, aria-checked and aria-pressed must change when the control changes. A button that says collapsed while the panel is open misleads users.
Bad: the attribute stays "false" after the panel opens.
<button aria-expanded="false" aria-controls="panel">Details</button>
<div id="panel">...</div>
Good, with script that keeps the state in sync:
button.addEventListener("click", () => {
const open = button.getAttribute("aria-expanded") === "true";
button.setAttribute("aria-expanded", String(!open));
panel.hidden = open;
});
Test by clicking the control and checking that the attribute changes with it.
Mistake 9: What happens when aria-labelledby or aria-describedby point to nothing?
These attributes reference other elements by id. If the id is missing, misspelled or duplicated, the label or description is silently lost.
Bad:
<input aria-describedby="email-hint">
<!-- no element has id="email-hint" -->
Good:
<input type="email" id="email" aria-describedby="email-hint">
<p id="email-hint">We will only use this to send your receipt.</p>
Keep ids unique, and check references after refactors and template changes. See how to make forms accessible for more patterns.
Mistake 10: How is aria-live misused?
Live regions announce changes without moving focus. They are useful for status messages (4.1.3 Status Messages), but misuse makes them noisy or silent.
- Overusing
role="alert"interrupts the user for routine updates. - Adding the live region at the same time as the message often means nothing is announced. The region should exist in the page first, then have its content changed.
- Live regions that update every second, such as a timer, flood the user.
Bad:
// Region created and filled at the same moment
document.body.insertAdjacentHTML("beforeend", '<div role="status">Saved</div>');
Good:
<div role="status" id="status"></div>
document.getElementById("status").textContent = "Saved";
Use role="status" (polite) for routine messages and role="alert" only for urgent errors.
How do you find and avoid ARIA mistakes?
- Prefer native HTML for buttons, links, inputs, lists, headings, tables and landmarks.
- Check the pattern in the ARIA Authoring Practices Guide before building a custom widget.
- Run an automated scan. Tools such as axe DevTools and WAVE flag many invalid ARIA uses. See the best free accessibility testing tools.
- Test with the keyboard and a screen reader. ARIA is a promise about behavior, and only testing shows whether the promise is kept. See the keyboard accessibility testing checklist.
- Review ARIA in code review, and ask for each attribute: what does this change, and does the behavior match?
Kerbwise audits the page you have open against WCAG 2.2 Level A and AA and ranks accessibility issues by severity, with the WCAG number, who is affected and how to fix each one. Whether ARIA behaves correctly still needs manual testing. See the WCAG 2.2 AA checklist.
Try Kerbwise on a page you own
Try Kerbwise ($29 one-time) to run this audit locally and export a client-ready PDF report. Get it on the Chrome Web Store or read more on the Kerbwise page.
Frequently asked questions
What is the first rule of ARIA?
If a native HTML element already has the semantics and behavior you need, use it instead of adding ARIA to another element.
Is ARIA required for accessibility?
No. Plain, well-structured HTML is accessible by default. ARIA is for custom widgets and gaps that HTML cannot fill.
Does aria-label improve SEO?
No. It is for assistive technology and is not a ranking signal. Do not use it for keywords.
Can I use aria-hidden on a button?
Not on one that users need. aria-hidden="true" removes it from the accessibility tree while it can still be focused. Use hidden or inert to remove content from view and keyboard order.
How do I test ARIA?
Run an automated scan for invalid attributes, then test with a keyboard and a screen reader to confirm that states change and names are read correctly.