Accessibility rule: Element IDs are not unique, explained
Summary
Each element ID must be unique to ensure the page’s structure and behavior work as expected. Duplicate IDs can cause issues with scripts and assistive technologies, leading to unpredictable or incorrect functionality.
Overview
The unicity of IDs is a key concept of the DOM (Document Object Model) standard. Even when hidden, any element ID needs to be unique. In order to fix the issue, it is required to change the element ID to a unique one.
Who is impacted by this?
Duplicate ID values can cause scripting (such as JavaScript) and assistive technologies to behave unexpectedly.
The ID of an element is more or less like the number on a passport. If two people have the same passport number, one can expect strange things to happen, especially if both people try to board the same airplane simultaneously.
How this is evaluated (or how it works)
This rule highlights IDs that are duplicated on the page. The rule considers both HTML and SVG.
What this article does not cover
Did you find it helpful? Yes No
Send feedback