jsx_a11y/aria-unsupported-elements Correctness
What it does
Certain reserved DOM elements do not support ARIA roles, states and properties. This is often because they are not visible, for example meta, html, script, style. This rule enforces that these DOM elements do not contain the role and/or aria-* props.
Example
Examples of incorrect code for this rule:
jsx
<meta charset="UTF-8" aria-hidden="false" />Examples of correct code for this rule:
jsx
<meta charset="UTF-8" />How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny jsx-a11y/aria-unsupported-elements --jsx-a11y-pluginjson
{
"plugins": ["jsx-a11y"],
"rules": {
"jsx-a11y/aria-unsupported-elements": "error"
}
}