WCAG H63: Using the scope attribute to associate header cells and data cells
- Rule ID:
- wcag/h63
- Category:
- Accessibility
- Standards:
- WCAG 2.2 (A)
- WCAG 2.1 (A)
- WCAG 2.0 (A)
WCAG H63 requires header cells to have scope to associate with data cells.
Rule details
Examples of incorrect code for this rule:
<th></th>
<!-- auto state cannot be set with a value -->
<th scope="auto"></th>
Examples of correct code for this rule:
<th scope="row"></th>
<th scope="col"></th>
<th scope="rowgroup"></th>
<th scope="colgroup"></th>
Markdown
If you are using content generated from Markdown consider disabling this rule as most markdown parsers does not generate <th>
elements with the scope attribute.
Alternatively use a disable directive somewhere in the markdown file:
<!-- [html-validate-disable-block wcag/h63: markdown does not generate tables with scope attribute] -->
| Foo | Bar | Baz |
| --- | --- | --- |
| 1 | 2 | 3 |
Version history
- 7.10.0 - Rule added.