Start scanning free

( Robust / WCAG 4.1.2 )

Duplicate id used in an ARIA reference

This check maps to Name, Role, Value. Use the guidance below to confirm the issue, understand who it affects and ship a fix.

Critical Level A WCAG 4.1.2 — Name, Role, Value

What’s wrong

An id referenced by aria-labelledby, aria-describedby, or a similar ARIA relationship attribute appears on more than one element.

Why it matters

ARIA reference attributes point at exactly one element by id. If two elements share that id, the browser resolves to whichever it finds first, and the label or description assistive tech announces may not be the one you intended.

How to fix it

Make every referenced id unique across the page.

Before
<span id="hint">Optional</span>
<input aria-describedby="hint">
<span id="hint">Required</span>
After
<span id="hint-email">Optional</span>
<input aria-describedby="hint-email">
<span id="hint-phone">Required</span>

Learn more