Skip to content

table-scope

Reports a scope attribute on an element other than <th>.

scope tells assistive technology which cells a header cell labels. On any other element it has no meaning and is ignored, so the table is no easier to read than without it, while the attribute suggests that it is.

Reported
...
<td scope="row"></td>
<th scope="row"></th>
...
angular:
lint:
rules:
table-scope: warn # off (default), warn, error
html:
lint:
rules:
table-scope: warn # off (default), warn, error
svelte:
lint:
rules:
table-scope: warn # off (default), warn, error
vue:
lint:
rules:
table-scope: warn # off (default), warn, error

Enabled by the presets: html/angular-eslint-recommended.

Suppress one line with sudsy-disable-next-line table-scope in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
angular-eslint table-scope full