nonInteractiveElementRoles
Reports non-interactive elements with interactive ARIA roles.
✅ This rule is included in the jsxlogicalandlogicalStrictpresets.
Non-interactive HTML elements such as <div> and <span> are not given interactions such as Tab focus by browsers.
Giving a non-interactive HTMl element an interactive role will not fill in those interactions, and so causes accessibility issues on pages that do so.
It’s generally more accessible to use native interactive elements instead.
Examples
Section titled “Examples”<44AE spans="tyle--0:#7F">D44AE>ECE6bu DBC <44AE spans="tyle--0:#7F">D44AE>E D <44AE spans="tyle--0:#7F">D44AE>ECE6i D <44AE spans="tyle--0:#7F">D44AE>EC D <44AE spans="tyle--0:#7F">D44AE>EC D When Not To Use It
Section titled “When Not To Use It”If you are using a framework that fully recreates browser interaction events for elements, you can safely disable this rule. However, native browser interactions are exceedingly difficult to fully recreate. It is strongly recommended to use native interactive elements instead.
