EsLint Plugin Lit A11y: role-supports-aria-attr
Enforce that elements with a defined role contain only supported ARIA attributes for that role. Some ARIA attributes are invalid when used with certain roles.
Rule Details
This rule aims to ensure the validity of the Accessibility Object Model.
Examples of incorrect code for this rule:
html` <li aria-required role="radio" aria-checked="false">Rainbow Trout</li> `;
html` <div role="combobox" aria-checked="true"></div> `;
Examples of correct code for this rule:
html` <div role="checkbox" aria-checked="true"></div> `;
html` <div role="presentation"></div> `;
When Not To Use It
If you do not use ARIA roles in your lit-html templates.