VibeFix

Guide · Shopify

Shopify focus outline missing: how to fix it

Published by Yosef Dabian, founder of VibeFix

How this guide was made: Written with AI assistance and checked against the sources linked on this page.

Updated

Short answer

If you press Tab on your Shopify store and cannot see which link or button has focus, a style may be hiding the focus outline, such as outline: none or outline: 0 with nothing put in its place. WCAG 2.4.7 (Focus Visible) says: "Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible." Find the rule in your theme CSS and replace it with a :focus-visible style, as in The fix. Test it with your own eyes and the Tab key.

Check your store's homepage for accessibility issues, free. We open it like any visitor and only read the page.

Check my store free

Free. No email needed. It usually takes about a minute.

Want it fixed? Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $390 until 30 Nov (Black Friday), then $490 one time. See the store service.

What a screen reader or keyboard user meets

A keyboard user moves through the page with Tab and Shift+Tab. With the outline removed, the focus is still moving but nothing on screen shows where it is. They cannot tell which link, button or field they are on, and may press Enter on the wrong one. W3C states the purpose of the criterion: "The purpose of this success criterion is to help a person know which element has the keyboard focus." MDN puts it this way: "removing focus styles makes keyboard navigation inaccessible for sighted users."

This failure affects sighted people who use a keyboard.

How to test it

  1. Keyboard Tab. Click the address bar, then press Tab again and again, starting at the top of your home page. At each stop, find the ring, underline or colour change that shows where you are. Go through the header, the menu, the search icon, the cart icon, product cards, filters, the newsletter field and the footer links. Any stop where you lose track of focus is a failure. Press Shift+Tab to walk backwards.
  2. Browser DevTools. Right-click the element that loses its ring, choose Inspect, and read the Styles pane for outline. Look for outline: none, outline: 0, or outline: 0 !important on :focus. Chrome's reference says its Accessibility tab shows "computed accessibility properties of DOM nodes", and the ring itself comes from the CSS.
  3. Free checker. Run Shopify accessibility checker for the rest of your homepage. It "covers what software can test of WCAG 2.0 and 2.1, Levels A and AA" on your public homepage, and it is an automated check, so use the Tab test above as the test for focus visibility.

Where to look in your theme

The rule lives in the theme's CSS files, in Online Store, then the horizontal menu, then Edit code. Shopify's help page says to "Duplicate your theme to create a backup copy" first. Work on the copy.

In Shopify's Dawn theme (checked on main, commit 779b283, 16 Nov 2026) the file is assets/base.css. Dawn does remove the default outline, and then gives it back for keyboard use:

*:focus {
  outline: 0;
  box-shadow: none;
}

*:focus-visible {
  outline: var(--focused-base-outline);
  outline-offset: var(--focused-base-outline-offset);
  box-shadow: var(--focused-base-box-shadow);
}

That pair is a safe pattern: the outline is removed on :focus and drawn again on :focus-visible. The trouble starts when someone copies the first block, or a rule like a { outline: none; }, and leaves out the second. Dawn also ships a utility class with its own warning in the source:

/* Dangerous for a11y - Use with care */
.focus-none {
  box-shadow: none !important;
  outline: 0 !important;
}

Search your theme files, including base.css, theme.css, section files with a {% style %} or <style> block and custom.css, for outline: none, outline:none, outline: 0, outline-style: none and focus-none. Pay attention to any hit that is not followed, further down, by a :focus-visible rule for the same element. An app's or a page builder's CSS can add one as well.

The fix

Delete the rule that removes the outline, or add a :focus-visible rule after it. MDN describes the pseudo-class as applying while an element matches :focus and the browser decides, by heuristics, that the focus should be made evident. The browser decides when that applies, so you can keep a clean look for mouse clicks.

Remove this:

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

Add this to the CSS file that held the rule you removed. Dawn does not need this block, because its base.css already draws a ring:

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 2px;
}

Pick a colour that stands out from the background it sits on. MDN notes that WCAG 2.1 SC 1.4.11 "requires that the visual focus indicator be at least 3 to 1." If part of your store has a dark background, add a second rule for that section, with a light colour:

/* PLACEHOLDER: replace .color-scheme-dark with the class your theme puts on dark sections */
.color-scheme-dark a:focus-visible,
.color-scheme-dark button:focus-visible {
  outline-color: #ffffff;
}

Replace .color-scheme-dark with the class your theme puts on the dark section. If the ring is cut off, check for overflow: hidden on a parent. A negative offset keeps it inside, which is what Dawn's focus-inset class does:

.focus-inset:focus-visible {
  outline: 0.2rem solid rgba(var(--color-foreground), 0.5);
  outline-offset: -0.2rem;
  box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3);
}

Do not add outline: none back to silence a complaint from a designer. If the default ring looks wrong, restyle it with the rules above.

For a link that is also an icon, check that the ring is not hidden by overflow: hidden on its container: set outline-offset: -2px on that element only.

Check your store's homepage for accessibility issues, free. We open it like any visitor and only read the page.

Check my store free

Free. No email needed. It usually takes about a minute.

Want it fixed? Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $390 until 30 Nov (Black Friday), then $490 one time. See the store service.

How to check it's fixed

  1. Reload the page and Tab through it from the top. Every stop shows a ring or another clear change.
  2. Click the same links with the mouse. The ring should not make the page look broken on a click.
  3. Open the cart drawer or the menu with Enter, then Tab inside it. The ring is visible in the drawer, and Escape or the Close button returns you to the page.
  4. Zoom the browser to 200% and Tab again. The ring is not cut off.
  5. Run the Shopify accessibility checker once more for the other homepage issues.

Every Shopify accessibility guide we publish, and the outside sources we rely on, are listed in the Shopify accessibility and ADA resource hub.

FAQ

Is outline: none wrong in every case?

No. It is fine when a :focus-visible (or other visible focus style) replaces it, as in Dawn's base.css. It is a failure when it is the only focus rule.

Does the browser's default ring count?

W3C lists "Using the default focus indicator for the platform so that high visibility default focus indicators will carry over" as a sufficient technique, so leaving the browser's default in place is allowed. The ring you add is for the case where the theme has already removed the default.

What is the difference between :focus and :focus-visible?

MDN's comparison example shows that :focus draws the ring on mouse clicks as well, while :focus-visible does not.

Why does the ring show on a button but not on my custom dropdown?

If a custom control is built from a div or span, press Tab and check whether it gets focus. If it does not, it needs a tabindex; with tabindex="0" it picks up the [tabindex]:focus-visible rule above. A native button or a is better, because it also works with the keyboard without extra code.

Does the free checker test focus visibility?

The checker is automated and covers what software can test on your homepage. A person pressing Tab is the test for this one.

Can I change focus colours in the theme editor instead of code?

Check your theme's settings. Dawn defines its focus ring in CSS, from --color-foreground, so a change to it is a code change.

Want it fixed?

VibeFix's AI agent fixes these issues in your theme's code on an unpublished copy. You preview the copy and publish it yourself, and the AI agent re-checks your live store and gives you a dated before-and-after report.

Shopify accessibility checker

Related guides

Sources

Last checked: 26 November 2026.

VibeFix is independent. Shopify is a trademark of its owner.

Want it fixed?

Our AI agent fixes accessibility issues in your Shopify theme's code within 48 hours of you giving us access to your theme, on an unpublished copy you preview and publish yourself. $390 until 30 Nov (Black Friday), then $490 one time. See the store service.

It starts with a free check of your public homepage. No email needed.

Check my store free

Shopify Accessibility Watch

Our monthly store-check numbers, one email a month.

We send a confirmation email first. One email a month, unsubscribe in one click. See our privacy notice.

More guides · Shopify store accessibility · About · Your privacy choices