Invalid aria-* attribute names, aria-labeledby included
A misspelled ARIA attribute is ignored by every browser and warns nobody. squirrel checks each aria-* name against the ARIA vocabulary.
What a valid ARIA attribute name is
ARIA defines a fixed set of aria-* state and property names. Anything outside it is an unknown attribute: the parser keeps it in the DOM, it fails HTML and ARIA conformance checking, and it does nothing at runtime. No console warning, no visible change, nothing.
The mistakes cluster in a few places. aria-labeledby with one l is the classic, because the correct spelling doubles it. aria-role does not exist; the attribute is plain role. And anything invented to look like ARIA, such as aria-title, falls straight through.
What squirrel checks
One check, aria-valid-attr, at severity error. It walks every element on the page, reads every attribute, lowercases the ones beginning with aria-, and looks each up in a set of 53 valid names.
- Fail with
N invalid ARIA attribute(s) found. Items readdiv: aria-labeledby, up to ten with a count of the rest. - Pass with
All ARIA attributes are valid, which is also what a page carrying no ARIA at all reports.
The check is about names only. Whether the value is legal is a11y/aria-valid-attr-value, and whether the attribute belongs on that particular element is a11y/aria-allowed-attr.
How to fix it
<h2 id="settings-title">Settings</h2>
<div role="dialog" aria-labelledby="settings-title">...</div>Correct the spelling against the ARIA attribute list. If the name you wanted does not exist, the information usually belongs in aria-label, aria-describedby or aria-roledescription.
A component library that spreads arbitrary props onto a DOM node is the usual source of a page full of these. Filter the props at the boundary rather than fixing the attributes one at a time.
| Rule ID | a11y/aria-valid-attr |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 8/10 |
Enable / disable
Disable this rule
[rules]
disable = ["a11y/aria-valid-attr"]Disable all Accessibility rules
[rules]
disable = ["a11y/*"]Enable only this rule
[rules]
enable = ["a11y/aria-valid-attr"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Related rules
- a11y/aria-valid-attr-value: a correct name carrying a value of the wrong type.
- a11y/aria-allowed-attr: a correct name on an element that contradicts it.
- a11y/aria-roles: the same class of typo in the
roleattribute. - a11y/duplicate-id-aria: ARIA references that point at nothing.
Accessibility findings ship in every audit next to the SEO, performance and agent experience rules. See Website security scan with AI for how an agent works through a report.
References
Check your site
Run squirrel audit https://example.com and open the Accessibility section of the report. Each unrecognized attribute is listed with the element carrying it. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.