astro/jsx-a11y/no-noninteractive-element-to-interactive-role

apply jsx-a11y/no-noninteractive-element-to-interactive-role rule to Astro components

This rule is the same rule as jsx-a11y/no-noninteractive-element-to-interactive-role rule but it applies to the Astro components.
You must have eslint-plugin-jsx-a11y installed to use this rule.

The following is a partial excerpt from the jsx-a11y/no-noninteractive-element-to-interactive-role rule documentation. See original documentation for more details.

Non-interactive HTML elements indicate content and containers in the user interface. Non-interactive elements include <main>, <area>, <h1> (,<h2>, etc), <img>, <li>, <ul> and <ol>.

Interactive HTML elements indicate controls in the user interface. Interactive elements include <a href>, <button>, <input>, <select>, <textarea>.

WAI-ARIA roles should not be used to convert a non-interactive element to an interactive element. Interactive ARIA roles include button, link, checkbox, menuitem, menuitemcheckbox, menuitemradio, option, radio, searchbox, switch and textbox.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-astro v0.11.0

🔍 Implementation

Taken with ❤️ from eslint-plugin-jsx-a11y

Edit this page