Focused elements must not be hidden behind other content
When an element receives keyboard focus, at least part of it must stay in view. Sticky headers, cookie banners and chat bars must not cover it completely. This is a WCAG 2.2 requirement at Level AA.
Readabler check
| Rule ID | rdb-focus-obscured |
|---|---|
| Impact | Serious |
| Success criterion | 2.4.11 Focus Not Obscured (Minimum) · AA |
| Standards | WCAG 2.2 |
| Fixed automatically |
Example
<style>
.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 6rem; }
</style>
<div class="cookie-bar">We use cookies. <button>Accept</button></div>
<a href="/returns">Returns policy</a>Tabbing to links near the bottom of the screen, focus disappears under the cookie bar.
<style>
html { scroll-padding-bottom: 6rem; }
.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 6rem; }
</style>
<div class="cookie-bar">We use cookies. <button>Accept</button></div>
<a href="/returns">Returns policy</a>The browser scrolls each focused link above the cookie bar, so it stays in view.
Why it matters
A focus indicator only helps if the user can see it. When focus moves to a link hidden under a sticky header, a cookie banner or a chat button, sighted keyboard users lose track of where they are, exactly as if there were no focus style at all.
People with motor disabilities who use the keyboard or a switch are affected, and so are people with low vision who zoom the page. At 200% or 400% zoom, a sticky header can take up a third of the screen, so it covers focused elements far more often.
WCAG 2.2 added success criterion 2.4.11 Focus Not Obscured (Minimum) at Level AA. It is met when the focused element is at least partly visible. The stricter 2.4.12 at Level AAA asks for it to be fully visible.
How to fix it
Reserve space for sticky bars. scroll-padding tells the browser to keep focused and scrolled-to content clear of fixed areas. Match it to the height of your header or footer:
<style>
html { scroll-padding-top: 5rem; scroll-padding-bottom: 6rem; }
</style>
Let users dismiss banners. A cookie or promotion bar that can be closed, and that receives focus first so keyboard users can close it, stops covering content for the rest of the visit.
Make sticky headers static on small screens and at high zoom:
<style>
@media (max-height: 500px) {
.site-header { position: static; }
}
</style>
Chat and feedback widgets. Keep the closed button small, and place it where it does not sit over form fields or links.
Dialogs. If a dialog is shown, make it modal (for example with showModal()), so focus cannot move to content behind it.
Checklist
- Set scroll-padding to the height of sticky bars.
- Let users close cookie and promotion banners.
- Turn sticky headers static at high zoom.
- Test by tabbing through the page at 200% zoom.
How the check works
During the same keyboard walk as the focus visibility check, the check probes five points on each focused element, the centre and four points near the corners, to see what lies on top. It reports the element only when all five are covered by content with position: fixed or sticky. Partly covered elements pass, as criterion 2.4.11 allows. Content that appears later, such as a chat pop-up, needs a manual check.
Resources
Updated October 27, 2026