Recent chats
ASKGEEZ Q&A GUIDETechnology & devices

How can I stop a sticky header from hiding the focused page control?

Quick answer

Use Tab and Shift+Tab to check whether the sticky header completely covers any focused control, then test in-page links to see whether their destinations land beneath it. Adjust the layout or scrolling so targets remain visible; scroll padding is one possible approach. Retest focus movement and link destinations across relevant pages and responsive layouts. [S1] [S2]

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

My site has a sticky header. How do I tell whether it is actually hiding keyboard focus?

Geez

Check the focused control and its focus indicator, not just whether the page scrolls. Start at the top of the page, use Tab to move through controls, and use Shift+Tab to move back. At each stop, check whether the header completely covers the focused item. W3C identifies that situation as a failure example and recommends checking focus movement in both directions. [S1]

Repeat the check on long pages where the viewport needs to scroll, and on pages with different content. Also check relevant responsive layouts, since the header may behave differently across them. Record the page, layout, and target when you find overlap so you can repeat the check after a change.

Follow-up question

What about buttons or headings reached through a link to a section?

Geez

Check those destinations separately. Activate each in-page link with the keyboard, then inspect where its destination lands. If the heading or control is beneath the sticky header, adjust the layout or scrolling so the target is immediately visible. W3C discusses scroll padding as one possible way to help prevent overlap from author-positioned content such as a sticky header. [S2]

For a concrete example, suppose a section link lands on a heading that is partly covered by the header. Try adjusting the page’s scrolling behavior with scroll padding, then activate that same link again and check whether the heading is visible. This is a way to test the proposed adjustment, not a guaranteed fix; check other destinations and focus movement too.

Follow-up question

If I add scroll padding, is that enough to consider the issue fixed?

Geez

No. Treat it as one possible adjustment, then rerun the checks. Scroll padding may help position a scroll destination, but you still need to check ordinary keyboard focus movement in both directions and in-page-link destinations. Confirm that the focused item is not completely hidden by the header. [S1] [S2]

Repeat those checks on relevant pages and responsive layouts, including where the header changes size or position. If a target remains obscured, revisit the layout or scrolling behavior rather than assuming the adjustment works everywhere. The cited WCAG discussion describes a minimum criterion addressing complete obscuring and notes that the enhanced criterion is stricter. This review does not establish conformance to every accessibility criterion. [S2]

Follow-up question

Can you give me a short review checklist I can use while testing?

Geez

Use this checklist for each relevant page and layout:

  1. Move through controls with Tab, then back through them with Shift+Tab.
  2. Check that the focused item and its focus indicator are not completely covered by the sticky header.
  3. Activate in-page links with the keyboard and inspect where each destination lands.
  4. If overlap occurs, adjust the layout or scrolling; consider scroll padding as one option. [S2]
  5. Repeat the checks on different pages and responsive layouts.
  6. Retest after the change and note any remaining obscured targets.

A useful test note is: “Page: [page]. Layout: [description]. Navigation: [Tab, Shift+Tab, or section link]. Target: [control or heading]. Result: [visible or obscured]. Change: [adjustment]. Retest: [result].” That gives you a repeatable record without treating one successful check as proof that every page works.

A practical checklist

  • Test keyboard focus with Tab and Shift+Tab.

  • Check whether the focused item and its focus indicator are completely covered.

  • Activate in-page links and inspect where their destinations land.

  • Adjust layout or scrolling when a target is obscured; consider scroll padding.

  • Repeat checks across relevant pages and responsive layouts.

  • Retest and record any remaining overlap.

A few more useful answers

Should I check only controls, or also section headings?

Check destinations reached through in-page links, including headings and controls. The key question is whether the target is immediately visible rather than hidden under the sticky element. [S2]

Does scroll padding guarantee that focus will never be obscured?

No. It is one possible way to address overlap, not a substitute for testing focus movement and in-page-link destinations across relevant layouts. [S1] [S2]

Does this check prove full accessibility conformance?

No. The cited guidance describes a minimum criterion addressing complete obscuring and notes that an enhanced criterion is stricter. This review focuses on the hiding problem, not every accessibility requirement. [S2]

Sources

References used for this guide.

  1. [S1] W3C Failure F110: Sticky Header or Footer Hides Focus
    w3.org · Checked
  2. [S2] Understanding WCAG 2.2 SC 2.4.11: Focus Not Obscured (Minimum)
    w3.org · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work