Duplicate ID Active
Checks that active, focusable elements have unique IDs
Checks that active, focusable elements have unique IDs
| Rule ID | a11y/duplicate-id-active |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/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
toml[rules]
disable = ["a11y/duplicate-id-active"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/duplicate-id-active"]
disable = ["*"]