Skip to content

ariaHiddenFocusables

Reports elements with aria-hidden='true' that are focusable.

✅ This rule is included in the jsx logical preset.

Elements with aria-hidden="true" should not be reachable via keyboard navigation. When users can focus elements they cannot perceive with a screen reader, it creates confusion and unexpected behavior.

This rule reports on any element that is focusable -either inherently or via tabIndex- and has aria-hidden="true".

<div aria-hidden="true" tabIndex="0" />
<input aria-hidden="true" />
<a href="/" aria-hidden="true" />
<button aria-hidden="true" />

If you separately use a framework that manages focus state for you such that focusable elements with aria-hidden="true" are never focused, you may prefer to disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.