Skip to main content
Checks that td headers attribute references valid th ids
Rule IDa11y/td-headers-attr
CategoryAccessibility
ScopePer-page
Severityerror
Weight6/10

Solution

When using the headers attribute on <td> elements to associate cells with headers, ensure each id in the headers attribute matches an existing <th> element’s id in the same table.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/td-headers-attr"]

Disable all Accessibility rules

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

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/td-headers-attr"]
disable = ["*"]