# jsx-a11y/no-aria-hidden-on-focusable Enforce that `aria-hidden="true"` is not set on focusable elements. `aria-hidden="true"` can be used to hide purely decorative content from screen reader users. An element with `aria-hidden="true"` that can also be reached by keyboard can lead to confusion or unexpected behavior for screen reader users. Avoid using `aria-hidden="true"` on focusable elements. ## Rule details ### Succeed ```jsx
// `tabIndex=-1` removes the element from sequential focus navigation so we don't flag it. // This is also bad but will not be handled by this rule. ``` ### Fail ```jsx ``` ## Accessibility guidelines General best practice (reference resources) ### Resources - [aria-hidden elements do not contain focusable elements](https://dequeuniversity.com/rules/axe/html/4.4/aria-hidden-focus) - [Element with aria-hidden has no content in sequential focus navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/proposed/) - [MDN aria-hidden](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden)