This check finds duplicated id attributes on elements that users can activate or focus, such as links, buttons, inputs, and custom controls.
Why this matters
DOM APIs and fragment links usually resolve an ID to a single element. Duplicates can send focus, labels, validation, or scripts to the wrong control and make automated behavior unpredictable.
How to fix it
- Find the component or loop that repeats the static ID.
- Generate a deterministic unique value per component instance and update every associated
for, ARIA, fragment, and script reference. - Prefer classes or data attributes when the selector is intended to match multiple elements.
- Check hidden modal and mobile-menu copies because they often duplicate desktop IDs.
When the finding appears across many URLs, fix the shared component or layout that produces it instead of patching generated HTML page by page. Recheck representative templates and responsive states after deployment so the correction does not create a regression elsewhere.
How to verify the fix
Search the rendered DOM for duplicate IDs, then activate labels, fragment links, and scripted controls. Test both desktop and responsive variants where duplicated components may coexist.
Keep before-and-after evidence for the affected URL, original output, correction, and verification method. If markup changes after load, test consent states, localization, responsive variants, and client-side navigation because the initial HTML and rendered DOM can differ.