Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Focus outline removed (outline:none): how to find and fix it

PRF-311Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

When you press Tab, the browser moves focus to the next link, button or form field and draws an outline around it. That outline is the focus indicator. It is how keyboard, switch and screen magnifier users know where they are on the page.

The problem starts when CSS removes it, usually with outline: none or outline: 0. Designers often do this because the default ring looks untidy after a mouse click. If nothing replaces it, the page gives no visual sign of focus. This fails WCAG 2.4.7 (Focus Visible), and WCAG 2.2 adds stricter rules about how clear the indicator must be.

The pattern that causes the problemcss
/* Common in resets and themes */
*:focus { outline: none; }

input:focus,
button:focus,
a:focus {
  outline: 0;
}

Why it costs you leads or sales

People who can't use a mouse still fill in forms and buy things. That includes people with motor disabilities, people with temporary injuries, and power users who tab through forms to move faster. If they can't see which field is active, they mistype, skip fields or give up on the form.

There is also a legal and reputational angle. Accessibility rules in many regions point to WCAG, and a missing focus indicator is one of the easiest failures for an auditor or complainant to demonstrate. The impact on any one funnel is medium, but it is cheap to fix.

How a keyboard user gets lost in a form
  1. Open landing pagePage loads normally
  2. Tab into the formFocus moves, outline is none
  3. Fill in fieldsUser can't see the active field
  4. Submit the leadForm is abandoned or sent with errors

Focus still moves, but nothing shows it, so the user can't tell which field they are typing in.

How to check if your site has it

Check focus visibility in five minutes
  1. Tab through the page

    Click in the address bar area, then press Tab repeatedly on your landing page, contact form and checkout. Watch for a visible ring or highlight on every link, field and button.

  2. Test with Shift+Tab

    Go backwards to be sure the indicator shows in both directions.

  3. Search your CSS

    In browser DevTools, open the Sources or Styles panel and search for outline: none, outline: 0 and outline:none. Also check your theme's custom CSS box.

  4. Inspect the focused element

    Tab to an element, right-click it, choose Inspect, and look at the Styles pane for the :focus rule. In Chrome you can also force the state with the :hov button.

  5. Run an accessibility scanner

    Browser-based tools such as Lighthouse or axe DevTools help, but they can miss a removed outline when a custom style replaces it. Manual tabbing remains the real test.

How to fix it

The best fix is to use :focus-visible. It shows the ring for keyboard users and usually hides it for mouse clicks, which is what designers wanted in the first place. Pick a colour with strong contrast against the background, a thickness of at least 2px, and an offset so the ring doesn't hide inside the element.

A reliable focus stylecss
:focus-visible {
  outline: 3px solid #1a56db;
  outline-offset: 2px;
}

/* On dark backgrounds */
.dark :focus-visible {
  outline-color: #ffffff;
}
Where to apply the fix by platform
  1. Find the rule

    Open Appearance > Customize > Additional CSS, and search your theme's stylesheet or child theme for outline: none. Also check page builder custom CSS fields.

  2. Replace it

    Delete the rule or add the :focus-visible style from above to Additional CSS. Use a child theme if you edit theme files, so updates don't overwrite it.

Focus style before and after

Before

  • `input:focus { outline: none; }` in the theme
  • No sign of which field is active
  • Keyboard users guess where they are

After

  • `:focus-visible` with a 3px outline
  • Ring shows on every link, field and button
  • Mouse users don't see an extra ring after clicking

How to confirm it's fixed

Confirmation checklist
  • Tab through the home page, landing page, contact form and checkout: every interactive element shows a ring
  • The ring is visible on light, dark and coloured backgrounds
  • The ring isn't cut off by overflow: hidden on a parent
  • Custom widgets such as dropdowns, sliders and modals show focus too
  • Search the CSS again and confirm no outline: none remains without a replacement
  • Test in at least Chrome, Safari and Firefox

How to prevent it happening again

Put the focus style in your design system or base stylesheet so it is the default. Add a line to your design review and QA checklist: tab through every new page. When you install a new theme, plugin or page builder template, run the same quick tab test, because updates often bring their own resets.

If you use a linter such as Stylelint, you can add a rule that flags outline: none in code reviews. This helps agencies that hand sites between several developers.

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard is a synthetic monitoring service: a robot visitor runs your lead forms, checkouts and booking buttons on a schedule and checks steps, tracking hits and test leads. It doesn't judge visual details such as focus styles.

Common questions

Questions people ask

Why is there no outline around my buttons and links when I press Tab?

Your CSS or theme probably sets outline: none or outline: 0 on focused elements, so the browser's default ring is hidden. Search your stylesheets for those rules and replace them with a visible :focus-visible style.

Is outline:none bad for accessibility?

Yes, when nothing replaces the outline. Keyboard users then can't see which element is focused, which fails WCAG 2.4.7 (Focus Visible). It is acceptable only if you provide your own clear focus style.

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

:focus applies whenever an element has focus, including after a mouse click. :focus-visible applies when the browser decides a visible indicator is helpful, mainly for keyboard use. It lets you show a ring for keyboard users without cluttering mouse clicks.

How do I fix outline:none on form fields?

Remove the rule or add a style such as input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #1a56db; outline-offset: 2px; }. Then tab through the form to check each field.

Can I remove the focus outline if I add a custom style?

Yes. Replacing the default with a custom outline, border or box-shadow is fine if it is clearly visible and has enough contrast against its surroundings. Avoid subtle changes like a slight colour shift.

What does WCAG 2.2 require for focus indicators?

WCAG 2.4.7 requires a visible keyboard focus indicator. WCAG 2.2 adds criteria about focus not being hidden by other content and, at the highest level, about the indicator's size and contrast. A solid 2px or thicker outline with good contrast is a safe approach.

Can FunnelGuard detect a missing focus outline?

No. This is outside what FunnelGuard checks. Use an accessibility testing tool plus manual keyboard testing for this issue.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.