astro/jsx-a11y/aria-activedescendant-has-tabindex
apply
jsx-a11y/aria-activedescendant-has-tabindex
rule to Astro components
This rule is the same rule as jsx-a11y/aria-activedescendant-has-tabindex 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/aria-activedescendant-has-tabindex rule documentation. See original documentation for more details.
aria-activedescendant
is used to manage focus within a composite widget. The element with the attributearia-activedescendant
retains the active document focus; it indicates which of its child elements has secondary focus by assigning the ID of that element to the value ofaria-activedescendant
. This pattern is used to build a widget like a search typeahead select list. The search input box retains document focus so that the user can type in the input. If the down arrow key is pressed and a search suggestion is highlighted, the ID of the suggestion element will be applied as the value ofaria-activedescendant
on the input element.Because an element with
aria-activedescendant
must be tabbable, it must either have an inherenttabIndex
of zero or declare atabIndex
of zero with thetabIndex
attribute.
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-astro v0.11.0
🔍 Implementation
Taken with ❤️ from eslint-plugin-jsx-a11yEdit this page
← astro/jsx-a11y/anchor-is-valid Next Page
astro/jsx-a11y/aria-props →