Skip to content

th-has-scope

Require scope attribute on <th> elements.

Severity

warning

❌ Incorrect

html
<table>
  <tr><th>Name</th></tr>
</table>

✅ Correct

html
<table>
  <tr><th scope="col">Name</th></tr>
</table>

Reference

Configuration

json
{
  "rules": {
    "th-has-scope": "warning"
  }
}

Released under the MIT License.