Inappropriate Headers Attribute Check
Description
The “Inappropriate Headers Attribute Check” evaluates whether there is any headers
attribute used within table cells references an element from outside the table.
Example outcome
I found 1 headers
attribute that refers to cells outside its table.
Impact
- Visual Impairments: Screen readers use the
headers
attribute to read the corresponding header for a data cell. If that reference leads to an element outside the table, the screen reader either doesn’t find the header, or, reads irrelevant or misleading information. - Cognitive Disabilities: Complex tables already demand mental focus. Without correct header relationships, data loses context, increasing cognitive load and confusion.
Fixes
To address inappropriate headers
attributes:
- Locate the inappropriate
headers
attribute. - Ensure that the
headers
attribute only referencesid
s of elements within the same<table>
. - Verify that the
id
referenced by theheaders
attribute exists and is unique within the document.