Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.13 KB

File metadata and controls

30 lines (19 loc) · 1.13 KB

ember/template-no-scope-outside-table-headings

💼 This rule is enabled in the 📋 template-lint-migration config.

The scope attribute is used on <th> elements to clarify the relationship between a table's header cells and data cells for screen readers. Scope is set to "row" or "col" for header cells that refer to a given row or column. For header cells that reference multiple rows or columns, set the scope attribute to "rowgroup" and "colgroup" and define the range for the rows or columns.

This rule disallows the use of the scope attribute on HTML elements other than the <th> element.

Examples

This rule forbids the following:

<a scope='col'></a>
<table scope='rowgroup'></table>

This rule allows the following:

<th scope='row'>A header cell</th>
<CustomHeader scope={{foo}} />

References