Latest Results
feat(lint): Add `table-header-missing-scope` lint rule (#345)
Checks that every `<th>` header cell has a `scope` attribute set to one of the
valid keywords `row`, `col`, `rowgroup`, or `colgroup`, mirroring the two steps of
WCAG technique H63:
- the attribute is present (a missing, empty, or valueless `scope` is flagged), and
- its value is one of the four recognized keywords (matched case-insensitively).
The `scope` attribute tells assistive technology whether a header cell labels a
column (`scope="col"`) or a row (`scope="row"`). Without it — or with an
unrecognized value, which browsers silently ignore — screen readers must guess the
header-to-data association in anything but the simplest table, so cells may be
announced with the wrong header or none at all (WCAG 1.3.1, Info and Relationships).
A `scope` declared inside a wrapping Jinja block, or whose value is a template
interpolation, counts as present and is left unvalidated to avoid false positives.
```html
<table>
<tr><th>Name</th><th scope="column">Email</th></tr>
<tr><td>Ada</td><td>ada@example.com</td></tr>
</table>
```
Use instead:
```html
<table>
<tr><th scope="col">Name</th><th scope="col">Email</th></tr>
<tr><td>Ada</td><td>ada@example.com</td></tr>
</table>
```
- [WCAG H63: Using the scope attribute](https://www.w3.org/WAI/WCAG21/Techniques/html/H63)
- [WCAG 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)
- [MDN: `<th>` `scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#scope) feat(lint): Add `table-header-missing-scope` lint rule
Checks that every `<th>` header cell has a `scope` attribute set to one of the
valid keywords `row`, `col`, `rowgroup`, or `colgroup`, mirroring the two steps of
WCAG technique H63:
- the attribute is present (a missing, empty, or valueless `scope` is flagged), and
- its value is one of the four recognized keywords (matched case-insensitively).
The `scope` attribute tells assistive technology whether a header cell labels a
column (`scope="col"`) or a row (`scope="row"`). Without it — or with an
unrecognized value, which browsers silently ignore — screen readers must guess the
header-to-data association in anything but the simplest table, so cells may be
announced with the wrong header or none at all (WCAG 1.3.1, Info and Relationships).
A `scope` declared inside a wrapping Jinja block, or whose value is a template
interpolation, counts as present and is left unvalidated to avoid false positives.
```html
<table>
<tr><th>Name</th><th scope="column">Email</th></tr>
<tr><td>Ada</td><td>ada@example.com</td></tr>
</table>
```
Use instead:
```html
<table>
<tr><th scope="col">Name</th><th scope="col">Email</th></tr>
<tr><td>Ada</td><td>ada@example.com</td></tr>
</table>
```
- [WCAG H63: Using the scope attribute](https://www.w3.org/WAI/WCAG21/Techniques/html/H63)
- [WCAG 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)
- [MDN: `<th>` `scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#scope)feat/lint/table-header-scope Latest Branches
-30%
eval/integrate-pretty-jinja -7%
feat/lint/table-header-scope 0%
© 2026 CodSpeed Technology