What happens if I have duplicate ID attributes on my page?
Question
I have duplicate ID attributes on my page but am unsure what to do and what problems can occur because of it.
Answer
When duplicate IDs are present, they cause issues for assistive technologies users when trying to interact with content. These issues can impact the user experience and hinder effective interaction with web pages or applications. Some of the problems related to duplicate ID attributes are the following:
- ARIA attribute issues
- Form Accessibility
- Scripting Issues
If duplicate IDs are discovered, ensure all ID attributes are unique.
Check out the Guided Manual WCAG Audit Tool from Accessible Web to better identify instances of duplicate IDs.