Skip to main content

Accessibility rule: Element IDs are not unique, explained

Modified on: Fri, 10 Mar, 2023 at 2:49 PM

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 barrier?

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 does the check work in technical terms?

This rule highlights IDs that are duplicated on the page. The rule considers both HTML and SVG. You can read more about the SIA-R3 rule in for Alfa, Siteimprove’s open-source accessibility conformance testing engine.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.