ariaUnsupportedElements
Reports ARIA attributes on elements that don't support them.
✅ This rule is included in the jsxlogicalandlogicalStrictpresets.
Specific reserved DOM elements do not support ARIA roles, states, and properties.
Those elements generally are either not visible (like meta, script, style) or have specific semantic meaning (like body or html).
This is required for WCAG 4.1.2 compliance.
Examples
Section titled “Examples”<any
meta charset: string
charset="UTF-8" aria-hidden: string
aria-hidden="false" /><any
script role: string
role="application" /><any
style aria-label: string
aria-label="styles" /><any
meta charset: string
charset="UTF-8" /><any
script src: string
src="app.js" /><any
div role: string
role="button" />When Not To Use It
Section titled “When Not To Use It”You should always use this rule to ensure ARIA attributes are only applied to elements that support them.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 around the world by
the Flint team and contributors.