Skip to main content
Checks that active, focusable elements have unique IDs
Rule IDa11y/duplicate-id-active
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Solution

Duplicate IDs on focusable elements (links, buttons, inputs) break keyboard navigation and label associations. Browsers only recognize the first element with a given ID, so labels, focus management, and ARIA references will target the wrong element. Ensure every focusable element with an id attribute has a unique value.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/duplicate-id-active"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/duplicate-id-active"]
disable = ["*"]