Skip to main content

Accessibility rule: Element IDs are not unique, explained

Modified on: Fri, 3 Feb, 2023 at 12:08 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. Luckily, there is usually an easy fix.

Who is impacted by this barrier?

Duplicate ID values can cause both 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, e can expect strange things to happen, especially if both people try to board the same airplane in the same time.

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.