Why is keyboard focus invisible on my website, and how should it be fixed?

A person uses an external keyboard beside a window, with a blue button visible on the laptop screen.

Key points

  1. Restore a visible focus indicator, then check whether fixed navigation or overlays hide it.
  2. Test the indicator on different backgrounds and controls, not just one homepage button.
  3. Give the developer a reproducible page and sequence, then repeat that sequence after the fix.

What should you fix first?

Stop removing the browser’s focus indicator. Ask the developer to identify the rule hiding it, then retain the default indicator or provide a clearly visible alternative. Focus identifies the element receiving keyboard input; it is not the mouse pointer. W3C’s Focus Visible explanation requires a mode with visible focus for keyboard-operable interfaces.

For a business website, start with enquiry buttons, contact fields and navigation. This article addresses visibility and the repair handover, rather than replacing a complete keyboard-operation review.

Is the indicator missing, or is the element covered?

Record which item should receive focus after Tab, then look for an outline, background change or another clear state. Check whether a fixed header, chat control or bottom notice covers it. W3C’s Focus Not Obscured (Minimum) concerns a focused component not being entirely hidden by author-created content. Seeing the indicator and seeing the component are related but distinct checks.

Do not report only that “Tab is broken”. Distinguish “I cannot locate the current item” from “the item is behind an overlay”, so a colour change does not leave the covering problem unresolved.

A keyboard, checklist notebook and laptop displaying a form on a desk.

What should the design and development brief say?

List text links, primary and secondary buttons, fields and dropdowns. Check each on light and dark backgrounds. Retaining a native indicator is an option; a consistent custom alternative is another. Removing it for a cleaner appearance is not the solution.

MDN’s :focus-visible documentation describes a browser decision based on heuristics. It is not a manually guaranteed “mouse off, keyboard on” switch. Check the result through real browser interaction rather than accepting a design mock-up alone.

What belongs in a repair ticket?

The following is an editorial handover checklist, not a test result:

  • The page URL, browser and viewport circumstances.
  • The interaction sequence starting from a fresh page load.
  • The expected focused element and the observed appearance.
  • Any fixed header, dialog or notification present.
  • The repair owner, candidate version and outstanding checks.

For example: “On the service page, moving from navigation to the enquiry button gives no distinguishable indication; the button should remain visibly focused.” This is an illustrative report, not evidence that HKONE tested a client website.

How should the fix be checked beyond a screenshot?

Repeat the original sequence, move backwards as well, and check with notices open, navigation expanded and different backgrounds. The indicator should not simply flash and disappear: W3C’s explanation says it must remain visible. Separate tested pages from untested pages rather than treating one button as the whole site.

If fixed content covers the item, ask the developer to address scrolling or overlapping behaviour too. Completing this check does not establish whole-site WCAG conformance, nor does it justify promises about rankings or enquiries.

Frequently asked questions

Must the indicator be a blue outline?

No. It must clearly identify the current item. Keep the browser default or have the designer and developer provide a suitable alternative.

Is a missing outline after a mouse click always a fault?

No. Browsers consider the interaction context. Check the real keyboard sequence and refer to MDN’s explanation.

Can we simply set outline to none?

Not without a clear replacement. Retain the default first rather than removing an interaction cue for appearance.

Is a partly visible button sufficient?

The minimum criterion and the better experience differ. W3C’s minimum criterion addresses complete covering; in practice, aim to keep the whole component and indicator clear.

Does fixing focus complete accessibility acceptance?

No. It addresses focus visibility only. Keyboard functionality, order, content structure and other requirements still need separate checks.

About the author: This article was written by the HKONE team. HKONE is a Hong Kong digital marketing and AI automation company providing social media management, website design, AI customer service and GEO / SEO for SMEs. Where this article mentions platform fees or policies, the platform's official information takes precedence.

Tell us about your business first. Then decide.

The consultation is free. We will understand your situation before recommending a plan and a quote.