New Tool Radar

AI Design Workflows

How to Check That a Sticky Header Never Hides the Focused Item

Check that a sticky header never covers the keyboard-focused item, because WCAG 2.2 requires the focused element to stay at least partly visible.

Schematic with three steps: tab through the page, watch the focused item, note any item hidden by sticky content.

Keyboard users follow the focus indicator down the page. When a sticky header, cookie banner, or chat button covers the focused link, they lose their place and cannot tell where they are. WCAG 2.2 made this a Level AA rule: the focused item must never be fully hidden by the page’s own content.

Why this needs its own check

WCAG 2.2 success criterion 2.4.11 Focus Not Obscured (Minimum), Level AA, says that when a user interface component receives keyboard focus, it is not entirely hidden due to author-created content. The plain-language summary is that a sticky header or cookie banner must not cover the focused item completely.

What you need before you start

  • The page open in a desktop browser
  • A keyboard to Tab through the page
  • The page scrolled so the sticky header is active

Step 1 – Tab from the top of the page

Press Tab repeatedly from the address bar down through the page. Watch each focused element as it receives focus, and note any element that disappears behind the sticky header or a banner.

Step 2 – Scroll and repeat in the middle

Scroll halfway down and Tab again. Sticky elements behave differently after scrolling, so a header that is fine at the top can still cover focus further down the page.

Step 3 – Test with the cookie banner showing

Reload the page so the cookie banner appears, then Tab through the first links. If the banner covers the focused link, that is a failure even if the header alone is fine.

Worked example

Practice check: a fictional Copper Kettle Tea Room shop page

The example below is fictional. Copper Kettle Tea Room is an invented business used only as a practice case. No real customer, page, or product is shown. Treat it as a practice case, not as evidence about any real business.

Part What it should be As shown Result
First navigation link Visible when focused Visible when focused Pass
Search box under sticky header Visible when focused Hidden behind the sticky header Fail – hidden behind the header
Add to basket button Visible when focused Visible when focused Pass
Footer contact link Visible when focused Covered by the cookie banner Fail – covered by the banner

Only 2 of the 4 checks pass: the first navigation link and the add-to-basket button. The two failures are the search box hidden by the sticky header and the footer link covered by the cookie banner.

What to do when something is wrong

Add scroll padding so focused elements stop below the sticky header, and make the cookie banner dismissible or move it so it never overlaps focused content. Re-test by keyboard after the fix.

Expected result. We checked the W3C and WCAG 2.2 checklist pages listed in Sources. We did not test a live Copper Kettle Tea Room page. UNTESTED: no keyboard pass was run on a real page; the practice table shows the expected result pattern for a page with a sticky header and a cookie banner.

Limits

  • This check covers the minimum rule only, that the focused item is not entirely hidden. It does not cover the stricter AAA rule that no part of it is hidden.

Sources

See all