Skip to content
SilktideHelp

Obsolete scope attribute

Silktide checks for scope attributes placed on ordinary table data cells. The scope attribute describes what a heading applies to, so it belongs on heading cells only; on a data cell it is obsolete and can mislead assistive technology.

In , scope is defined for <th> heading cells. Putting it on a <td> data cell usually means one of two things: the cell really is a heading and should be a <th>, or the attribute is left over from old markup and should be removed.

<!-- Problem: scope on a data cell -->
<td scope="col">Name</td>

Why this matters

A builds its picture of a table from the markup. A scope attribute on a data cell is a contradictory signal: the element says "I am data" while the attribute says "I label other cells". Different resolve that contradiction differently - some ignore the attribute, others treat the cell as a heading - so the table can be announced with wrong or inconsistent headings depending on what software the visitor uses.

How to fix it

Decide what the cell really is:

  1. If it acts as a heading, change it to a <th> and keep a valid scope value (row, col, rowgroup, or colgroup):
<!-- Fixed: the heading is a real header cell -->
<th scope="col">Name</th>
  1. If it is ordinary data, remove the scope attribute entirely:
<!-- Fixed: plain data cell -->
<td>Name</td>

How Silktide tests this

  1. Find every table cell on each page.
  2. Report each <td> data cell that carries a scope attribute, whatever its value.

Learn more

Last updated

Was this page helpful?