| Rule ID | a11y/table-headers |
| Category | Accessibility |
| Scope | Per-page |
| Severity | warning |
| Weight | 4/10 |
Solution
Data tables need proper headers for screen reader users to understand relationships. Use<th> for header cells, not styled <td>. Add scope=‘col’ or scope=‘row’ to clarify header direction. For complex tables, use id and headers attributes to associate data cells with headers. Include a <caption> to describe the table’s purpose. Layout tables should have role=‘presentation’.
Enable / Disable
Disable this rule
squirrel.toml
Disable all Accessibility rules
squirrel.toml
Enable only this rule
squirrel.toml