How to fix focus not visible on Adobe Commerce (Magento)
Add a clearly visible focus indicator to every interactive element so keyboard users can always see which element is currently selected.
Steps for Adobe Commerce (Magento)
- Locate your active theme directory: app/design/frontend/<Vendor>/<theme>/web/css/.
- Open _module.less / _extend.less or the main source/_theme.less file. Search for 'outline'.
- Remove any `outline: none` declarations on interactive selectors, then add the universal `:focus` / `:focus-visible` rule from the snippet below.
- Run `bin/magento setup:static-content:deploy` and clear the cache (`bin/magento cache:flush`).
- Tab through storefront, product, cart, and checkout pages to confirm focus is visible.
What is focus not visible?
When someone navigates your store using only a keyboard (Tab, Shift+Tab, arrow keys), their browser highlights the currently focused element — a button, link, form field, etc. — so they know where they are. This is called the "focus indicator" or "focus ring." The problem occurs when a theme or custom CSS removes or hides this highlight (often via `outline: none` or `outline: 0`), making the page look cleaner but leaving keyboard users completely lost. WCAG Success Criterion 2.4.7 (Focus Visible) requires that this focus indicator always be visible.
Roughly 7% of internet users navigate primarily by keyboard — including people with motor disabilities, power users, and anyone whose mouse has stopped working. If they can't see where focus is, they literally cannot use your store: they can't tell which product they're about to add to the cart, which field they're typing in, or which button they're about to press. Beyond lost sales, hiding focus indicators is a WCAG 2.1 Level AA violation, which creates legal exposure under the ADA, the European Accessibility Act, and similar laws in many countries. Accessible stores also tend to rank better because Google uses accessibility signals as a quality indicator.
See the complete Focus not visible 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 focus not visible and every other issue across your whole site.
Scan my site free