How to fix aria hidden focus on Adobe Commerce (Magento)

Remove `aria-hidden="true"` from any element that contains focusable children (links, buttons, inputs), or remove those focusable children from the keyboard tab order so they cannot receive focus while hidden from assistive technology.

Steps for Adobe Commerce (Magento)

  1. SSH into your server or use your IDE to locate the offending template. Run the axe scan in Chrome to identify the exact HTML element, then trace it to a .phtml template in your active theme (app/design/frontend/<Vendor>/<theme>/).
  2. Common sources in Magento: the off-canvas navigation (Magento_Theme/templates/html/header.phtml), the minicart drawer (Magento_Checkout/templates/cart/minicart.phtml), and layered navigation sidebar.
  3. Create overrides in your custom theme directory rather than editing core files: copy the relevant .phtml to app/design/frontend/<YourVendor>/<YourTheme>/ preserving the module path.
  4. In the template or its companion RequireJS module (web/js/), update the open/close toggle logic: closed state → aria-hidden='true' on container + tabindex='-1' on all focusable children; open state → remove aria-hidden + remove tabindex='-1'.
  5. Run bin/magento cache:clean && bin/magento cache:flush, then hard-refresh the storefront and re-run the axe scan to verify the fix.
Official Adobe Commerce (Magento) documentation ↗

What is aria hidden focus?

The `aria-hidden="true"` attribute tells screen readers to completely ignore an element and everything inside it — as if it doesn't exist. The problem arises when a focusable element (a button, link, or form field) lives inside that hidden container. Keyboard users can still tab into it, but screen-reader users hear nothing because the element has been silenced. This creates a "ghost focus" trap: the keyboard cursor lands on something invisible to assistive technology with no announcement, no label, and no way to understand what it does. WCAG Success Criterion 4.1.2 (Name, Role, Value) requires that all interactive UI components expose their name and role to assistive technology.

Screen-reader users — who are often blind or have low vision — can get stuck on focusable elements that their software cannot describe, making parts of your store completely unusable for them. This is a direct WCAG 2.1 Level A violation, the most severe tier, meaning it fails the baseline legal accessibility standard referenced in regulations like the ADA (US), EN 301 549 (EU), and the European Accessibility Act. Beyond legal risk, stores with accessibility barriers lose customers: roughly 1 in 4 adults has some disability, and inaccessible checkout flows directly reduce conversions. Automated accessibility tools (axe, Lighthouse, WAVE) flag this as a critical failure, which can surface in legal demand letters and audits.

See the complete Aria hidden focus guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ scan — we’ll find aria hidden focus and every other issue across your whole site.

Scan my site free

Fix aria hidden focus on another platform