Use the scope attribute only on header cells, with a valid value
The scope attribute tells assistive technology which cells a header describes. It belongs on <th> cells only and accepts four values. This is a best practice, not a WCAG requirement.
| Rule ID | scope-attr-valid |
|---|---|
| Impact | Moderate |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<table>
<tr><th scope="column">Plan</th><th scope="column">Monthly price</th></tr>
<tr><td scope="row">Basic</td><td>$9</td></tr>
<tr><td scope="row">Pro</td><td>$29</td></tr>
</table>On “$29”, a screen reader may announce only the price, without saying it belongs to the Pro plan.
<table>
<tr><th scope="col">Plan</th><th scope="col">Monthly price</th></tr>
<tr><th scope="row">Basic</th><td>$9</td></tr>
<tr><th scope="row">Pro</th><td>$29</td></tr>
</table>A screen reader announces “Pro, Monthly price, $29”, so the price is tied to its plan.
Why it matters
Screen reader users explore a table one cell at a time. As they move, the screen reader reads out the row and column headers that apply to the current cell, so they know what each number means. The scope attribute is one of the signals it uses to make that link.
When scope sits on a <td>, or carries a value like column or left, browsers ignore it. The table then behaves as if it had no row headers, or the browser falls back on guesses that vary between screen readers. A blind visitor comparing pricing plans or a timetable hears bare values with no context and has to keep scrolling back to the top row to work out what they mean.
A correct scope costs nothing and makes the table predictable in every browser and screen reader.
How to fix it
Put scope only on <th> elements, and use one of the four allowed values.
Header for a column. Use scope="col" (not column):
<th scope="col">Departure</th>
Header for a row. If the first cell of each row names the row, make it a <th>, then add scope="row":
<tr>
<th scope="row">Monday</th>
<td>08:15</td>
</tr>
Header for a group. When a header spans several rows or columns, use rowgroup or colgroup. Group the rows with <tbody>, or the columns with <colgroup>:
<tbody>
<tr><th scope="rowgroup" rowspan="2">Weekdays</th><td>Monday</td><td>08:15</td></tr>
<tr><td>Tuesday</td><td>08:20</td></tr>
</tbody>
scope on a data cell. If the cell is really a header, change <td> to <th>. If it is data, remove the attribute.
You can style <th> to look like any other cell, so design is never a reason to keep a header as <td>. Values are not case-sensitive, but lowercase keeps your markup consistent.
Checklist
- Use scope only on th elements.
- Use col, row, colgroup or rowgroup, nothing else.
- Turn row-naming td cells into th scope="row".
- Remove scope from cells that hold data.
How the check works
The check looks at every <td> and <th> that has a scope attribute. It fails when the attribute sits on a <td> in an HTML5 document, or when its value is not row, col, rowgroup or colgroup (case is ignored). It does not judge whether the chosen direction is right: check manually that each col header sits above its data and each row header to its left.
Resources
- Tables tutorial W3C WAI
Updated October 27, 2026