Fix · Moderate · should fix soon
How to fix: duplicate id attributes
aria-describedby and label-for break unpredictably. Multiple elements with the same id break attribute references.
- WCAG references
- 4.1.1
- Severity
- Moderate
What it looks like in the wild
aria-describedby and label-for break unpredictably.
The screen-reader user, keyboard user, or low-vision user encountering this issue does not get an error message. The page just stops working for them. Which is why this kind of bug rarely shows up in your error tracker; it shows up in support tickets, lawsuits, and abandoned conversions.
Why it fails WCAG
Multiple elements with the same id break attribute references.
Map this back to 4.1.1 when you log the bug. Auditors and procurement teams expect that mapping; "broken" is not enough context.
The wrong pattern (avoid)
HTML
<label for="email">A</label><input id="email">
<label for="email">B</label><input id="email">The right pattern (copy this)
HTML
<label for="email-a">A</label><input id="email-a">
<label for="email-b">B</label><input id="email-b">Related fixes
Find every accessibility issue on your site in 60 seconds.
Free public scan. No card. AI-generated fixes for every issue we find.