scopeProps
Reports scope props on non-th elements.
✅ This rule is included in the jsx logical preset.
The scope attribute defines whether a table header is a column header or row header.
Using it on non-<th> elements has no semantic meaning and may confuse assistive technologies.
This is required for WCAG 1.3.1 and 4.1.1 compliance.
Examples
Section titled “Examples”<div scope /><div scope="col" /><td scope="row" /><th scope="col" /><th scope="row" /><th scope={scope} /><div />When Not To Use It
Section titled “When Not To Use It”If you’re not working with HTML tables, you can disable this rule.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
jsx-a11y/scope - Oxlint:
jsx_a11y/scope
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.