Duplicate id is used by a label or ARIA attribute

  • WCAG 4.1.2 Name, Role, Value, level A
  • Moderate
  • Structure
  • Automated
  • Server pass

Why it matters

Browsers pick the first element with a given id, so a label or aria-describedby can end up attached to the wrong thing. (WCAG 2.2 dropped the old parsing rule, so duplicates only matter when something refers to them.)

How to fix it

Make every id that is referenced unique on the page.

<!-- Before -->
<input id="email"> ... <input id="email">

<!-- After -->
<input id="header-email"> ... <input id="footer-email">

Read the W3C guidance: Understanding 4.1.2 Name, Role, Value.

Related rules

Find this on your own site. A11yMate scans every page and lists where it happens. See pricing or browse all rules.