# Focus Not Obscured: Keep the Focused Item Visible

Source: https://allyway.ai/glossary/focus-not-obscured

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](https://allyway.ai/glossary/cookie-banner-accessibility) 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)](https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html) is a Level AA criterion, new in [WCAG 2.2](https://allyway.ai/regulations/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](https://allyway.ai/glossary/content-on-hover-or-focus)) 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](https://allyway.ai/glossary/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.

> **Note:** > **Semi-transparent bars are not a free pass**
> A see-through sticky footer may not entirely hide the focused element, but W3C warns that it can still fail [non-text contrast](https://allyway.ai/glossary/non-text-contrast) (1.4.11) if the focus indicator loses contrast behind it.

## 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`.

```html title="Example"
<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>
```

**Do:** Do

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](https://allyway.ai/glossary/keyboard-navigation) you expect visitors to use.

**Don't:** Don't

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

Q: Can a sticky header fail WCAG?
A: 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.

Q: How do I fix a sticky header that hides focus?
A: 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.

Q: What is the difference between 2.4.11 and 2.4.12?
A: 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.

Q: Do cookie banners fail focus not obscured?
A: 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.
