EsLint Plugin Lit A11y: scope
Enforce scope attribute is only used on <th> elements.
The scope attribute may only be used on <th>
elements.
Rule Details
This rule aims to prevent invalid use of scope
attribute.
Examples of incorrect code for this rule:
html` <td scope="row"></td> `;
html` <div scope="col"></div> `;
html` <th scope="foo"></div> `;
Examples of correct code for this rule:
html` <th scope="col"></th> `;
html` <th scope="row"></th> `;
html` <th scope="colgroup"></th> `;
html` <th scope="rowgroup"></th> `;
html` <foo-bar scope="col"></div> `;
html` <foo-bar scope="row"></div> `;
html` <foo-bar scope="foo"></div> `;
When Not To Use It
When you do not use the scope
attribute in your lit-html templates.