Accessibility Wiki

scope attributes must be valid and on header cells

Rule table-scope-valid · Structure & semantics · impact moderate · Static + live

↩ Back to the rules index · WCAG cross-reference

Why it matters

The scope attribute tells screen readers which cells a header describes. A misspelled value (e.g. scope="column") is ignored, so the header association is silently lost; scope on a is obsolete in HTML5 and unreliably supported.

How to fix

Use one of row, col, rowgroup, colgroup. If a cell acts as a header, make it a ; data cells can reference headers via the headers attribute instead.

Example

✕ Fails
<table><tr><th scope="column">Name</th><th scope="column">Age</th></tr><tr><td>Ada</td><td>36</td></tr></table>
✓ Passes
<table><tr><th scope="col">Name</th><th scope="col">Age</th></tr><tr><td>Ada</td><td>36</td></tr></table>

Example

✕ Fails
<table><tr><td scope="col">Name</td></tr><tr><td>Ada</td></tr></table>
✓ Passes
<table><tr><th scope="col">Name</th></tr><tr><td>Ada</td></tr></table>

A valid scope on a is obsolete markup — the cell is acting as a header, so make it a .

WCAG success criteria

1.3.1 Info and Relationships — Level A

Structure and relationships conveyed visually (headings, lists, tables, labels, groups) must also be available programmatically.

Understanding 1.3.1

Standards

This rule contributes to the following standards:

WCAG A EN 301 549 Best practice

Standard Criteria
EN 301 549 9.1.3.1

References