Will It Vibe logoWill It Vibe?
A11Y-009Low severity-4 points

Duplicate literal id attribute

Part of Documentation, UX & Accessibility, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.

What it detects

The same literal id value is used on more than one element in the same file. IDs must be unique per document: once duplicated, aria-describedby/aria-labelledby/label-for associations become ambiguous (the browser resolves to only the first match), and getElementById-style lookups silently grab the wrong node. Only exact literal string duplicates are flagged; dynamic ids built from a variable or expression are not evaluated statically and are skipped.

Why it matters

When the same id value is used on two elements in one document, the association becomes ambiguous: a label's for, an aria-describedby, or a plain getElementById-style lookup can only resolve to the first match in the DOM, so the second element with that id silently loses whatever it was supposed to be linked to. This kind of bug is invisible in a visual review since nothing looks wrong on screen, it only breaks for assistive technology and for any script depending on the id being unique.

How to fix it

Rename one of the duplicated ids to something unique, updating every for/aria-*/CSS/JS reference that pointed at the old shared value to point at the correct one specifically. In a component that renders multiple times (a list item, a card), derive the id from the item's own key/index instead of a static string.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Documentation, UX & Accessibility checks