Focus Not Obscured: Keep the Focused Item Visible
Also called: Focus Not Obscured (Minimum), Hidden focus, Obscured focus, Sticky header covering focus
Definition
Focus Not Obscured (Minimum) is WCAG success criterion 2.4.11. When a user interface component receives keyboard focus, it is not entirely hidden due to author-created content such as sticky headers, footers or non-modal dialogs.
Focus Not Obscured is the WCAG 2.2 rule that the element a keyboard user has just tabbed to must not disappear behind other content. A sticky header, a cookie banner pinned to the bottom of the screen or a chat box can cover links and fields while people tab through the page – they press Tab and no longer know where they are.
What it means
WCAG 2.4.11 Focus Not Obscured (Minimum) is a Level AA criterion, new in WCAG 2.2: when a user interface component receives keyboard focus, the component is not entirely hidden due to author-created content.
| Situation | Result |
|---|---|
| Sticky header or footer hides the focused link completely | Fails (W3C failure F110) |
| The focused component is partly covered but still visible | Passes 2.4.11 – the AAA criterion 2.4.12 asks for none of it to be hidden |
| Non-persistent content the user opened (menu, date picker, tooltip) covers it | Passes – it closes when focus moves away |
| Persistent content the user opened (a chat window) covers it | Can fail |
| A cookie banner entirely covers the focused element | Fails – unless the banner is modal, scroll padding keeps space, or it closes when focus leaves it |
| A modal dialog takes focus when it appears | Always passes |
The rule is about the focused component, not the focus outline. If the outline is hidden, the page probably fails focus visible (2.4.7) as well. For configurable interfaces, only the initial positions of user-movable content are considered.
W3C names who benefits: people who use a keyboard or keyboard-like input such as switch, voice or scanning tools; people with low vision using magnification; and people with attention or memory limitations who need to find focus quickly.
Examples
The typical problem: a 64 px sticky header. When the browser scrolls a focused link into view at the top of the window, it lands under the header. W3C technique C43 solves this with scroll-padding.
<style>
header.site { position: sticky; top: 0; height: 64px; }
.cookie-bar { position: fixed; bottom: 0; height: 80px; }
/* Good: the browser keeps focused elements out of the sticky areas */
html {
scroll-padding-top: 72px; /* header height + 8 px air */
scroll-padding-bottom: 88px; /* cookie bar height + 8 px air */
}
</style>Set scroll-padding to the height of sticky bars, close cookie banners once they lose focus or make them modal, keep chat widgets from covering content, and test every page with the keyboard navigation you expect visitors to use.
Pin large banners over the page without a way to dismiss them, let sticky headers grow while scrolling without adjusting scroll padding, or open a persistent panel that sits over links and fields.
How to check focus not obscured
Questions
Can a sticky header fail WCAG?
Yes. If a sticky header or footer completely hides the element that receives keyboard focus, the page fails 2.4.11 (W3C failure F110). Partly covered elements pass at Level AA.
How do I fix a sticky header that hides focus?
Add scroll-padding-top (and scroll-padding-bottom for fixed footers) to the scrolling container, matching the bar's height. The browser then scrolls focused elements into the visible area.
What is the difference between 2.4.11 and 2.4.12?
2.4.11 Focus Not Obscured (Minimum, AA) only forbids hiding the focused element entirely. 2.4.12 Focus Not Obscured (Enhanced, AAA) requires that no part of it is hidden.
Do cookie banners fail focus not obscured?
They can. A banner that entirely covers the focused element fails. W3C lists ways to pass: make it modal, use scroll padding, or close it when focus leaves the banner.
Related terms
Focus Visible: WCAG 2.4.7 and Visible Focus Styles
Focus visible means that a website shows a visible indicator – usually an outline – on the link, button or field that currently has keyboard focus. WCAG 2.4.7 requires it at Level AA.
Read definition: Focus Visible: WCAG 2.4.7 and Visible Focus StylesFocus Order: Logical Tab Order Explained (WCAG 2.4.3)
Focus order is the sequence in which interactive elements receive keyboard focus when a user presses Tab. WCAG 2.4.3 requires that this sequence preserves the meaning and operability of the page.
Read definition: Focus Order: Logical Tab Order Explained (WCAG 2.4.3)Keyboard Navigation: WCAG 2.1.1 Explained
Keyboard navigation means that every function of a website can be reached and operated with a keyboard alone – usually with Tab, Shift+Tab, Enter, Space and the arrow keys. WCAG 2.1.1 requires it at Level A.
Read definition: Keyboard Navigation: WCAG 2.1.1 ExplainedSkip Link: Jump Straight to the Main Content
A skip link is a link at the very top of a page that jumps to the main content, so keyboard and screen reader users do not have to pass the whole menu on every page. It is a sufficient technique for WCAG 2.4.1.
Read definition: Skip Link: Jump Straight to the Main Content