Accessibility fix guide
WCAG 4.1.2 Name, Role, Value
How to fix: Hidden elements must not be focusable
An element with aria-hidden="true" must not contain focusable controls, or keyboard users tab onto targets a screen reader cannot see.
The fix
Do not place focusable elements inside aria-hidden="true" containers.
Before and after
Fails
<div aria-hidden="true"><button>Save</button></div>
Passes
<div aria-hidden="true"><button tabindex="-1" disabled>Save</button></div>
Related fixes
Does your site have this issue?
Scan any page free against WCAG 2.2 AA and get every issue with its fix.
Scan your site free