💼 This rule is enabled in the following configs: strict-gjs, strict-gts.
Requires table elements to use table grouping elements.
Tables should use <thead>, <tbody>, and <tfoot> elements to group related content. This improves accessibility for screen reader users and makes the table structure more semantic.
This rule requires that <table> elements use grouping elements (<thead>, <tbody>, <tfoot>) instead of having <tr> elements as direct children.
Examples of incorrect code for this rule:
<template>
<table>
<tr><td>Data</td></tr>
</table>
</template><template>
<table>
<tr><th>Header</th></tr>
<tr><td>Data</td></tr>
</table>
</template>Examples of correct code for this rule:
<template>
<table>
<thead>
<tr><th>Header</th></tr>
</thead>
<tbody>
<tr><td>Data</td></tr>
</tbody>
</table>
</template><template>
<table>
<tbody>
<tr><td>Data</td></tr>
</tbody>
</table>
</template>