interactiveElementRoles
Reports interactive elements with non-interactive ARIA roles.
✅ This rule is included in the jsxlogicalandlogicalStrictpresets.
Interactive HTML elements such as <button> and <a> are given interactions such as Tab focus by browsers.
Giving an interactive HTML element a non-interactive role will remove those interactions, which causes accessibility issues on pages that do so.
Preserve the native element behavior or use a different native element instead.
Examples
Section titled “Examples”<44AE spans="tyle--0:#7F">D44AE>ECE <6div spans="tyle--0:#7F">D6div><44AE spans="tyle--0:#7F">D44AE>ECE <6img spans="tyle--0:#7F">D6img><44AE spans="tyle--0:#7F">D44AE>ECE <6nav spans="tyle--0:#7F">D6nav>de<44AE spans="tyle--0:#7F">DB44AE>ECE <6nav spans="tyle--0:#7F">D6nav><44AE spans="tyle--0:#7F">D44AE>ECE6bu DBC <44AE spans="tyle--0:#7F">D44AE>E D When Not To Use It
Section titled “When Not To Use It”If you are using a framework that intentionally removes native browser interactions, you can disable this rule. However, removing native browser interactions is strongly discouraged as it harms accessibility. It is recommended to preserve native interactive element behaviors.
