Ensure every ID attribute value is unique

The value of an id attribute must be unique to prevent other instances from being overlooked by assistive technologies. Lighthouse reports any duplicate IDs found in a page:

Lighthouse audit showing ID attributes on the page are not unique
ID attributes on the page are not unique.

How to fix this problem

To fix this problem, avoid duplicate IDs. Duplicate IDs are common validation errors that may break the accessibility of labels. Assistive technologies typically only reference the first one accurately.

To remove duplicate IDs, change an ID value if it is used more than once to be sure each is unique. Learn more in ID attribute values must be unique.

More information

Last updated: Improve article