Unique IDs for ARIA references
Last updated:
How to fix duplicate-id-aria?
Each ID on a page must appear only once. When using ARIA attributes that reference an ID, verify that the target ID is unique:
unique IDs
<label id="email-label">Email address</label>
<input type="email" aria-labelledby="email-label"/>
<label id="phone-label">Phone number</label>
<input type="tel" aria-labelledby="phone-label"/>
aria-describedby with unique ID
<input type="password" aria-describedby="password-hint"/>
<p id="password-hint">Use at least 8 characters.</p>
The following is invalid because two elements share the same ID:
duplicate ID
<label id="field-label">Email address</label>
<input type="email" aria-labelledby="field-label"/>
<label id="field-label">Phone number</label>
<input type="tel" aria-labelledby="field-label"/>
In the example above, both inputs reference field-label, so the second input may be announced incorrectly or not at all.
Why is this important?
ARIA attributes work by referencing IDs on the page. When IDs are duplicated, browser behavior is unpredictable.
More info:
Rule info
Standard
User impact
Critical impact Prevents users with disabilities from accessing content entirely. Must be fixed. Critical : blocks access entirely Serious : significantly hinders use Moderate : causes difficulty Minor : minimal disruptionFix complexity
High level of required technical expertise To resolve this issue, you need technical expertise in software engineering. Resolving this issue requires modifying the software code, for which you need a background in software engineering.Affects
Free Website Accessibility Audit