You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi team. I'd like to propose a rule that flags when aria-hidden="true' is set on focusable elements or on elements with descendants that are focusable. The rationale is that aria-hidden should be reserved for elements that are non-interactive since assistive technology users can still reach interactive elements in keyboard even with aria-hidden="true". Setting aria-hidden="true" on focusable elements can lead to unexpected behavior or be confusing.
An exception for this rule could be if a tabindex="-1" is set to remove it from keyboard order or if it's an input element with disabled. (While this could be an exception, I don't think this is necessarily a "good" approach since it's questionable whether interactive elements should be considered decorative, to begin with)
I would consider the following as focusable elements: textarea, button, a, input, summary.
What do you think? Am I missing anything?
I'm happy to start a draft PR.
The text was updated successfully, but these errors were encountered:
Hi team. I'd like to propose a rule that flags when
aria-hidden="true'
is set on focusable elements or on elements with descendants that are focusable. The rationale is thataria-hidden
should be reserved for elements that are non-interactive since assistive technology users can still reach interactive elements in keyboard even witharia-hidden="true"
. Settingaria-hidden="true"
on focusable elements can lead to unexpected behavior or be confusing.An exception for this rule could be if a
tabindex="-1"
is set to remove it from keyboard order or if it's an input element withdisabled
. (While this could be an exception, I don't think this is necessarily a "good" approach since it's questionable whether interactive elements should be considered decorative, to begin with)I would consider the following as focusable elements:
textarea
,button
,a
,input
,summary
.What do you think? Am I missing anything?
I'm happy to start a draft PR.
The text was updated successfully, but these errors were encountered: