Your Sticky Header Is Hiding the Pay Button From Keyboard Shoppers

The shopper removes an out of stock item, the cart total changes, a red banner appears at the top of the page, and their screen reader says nothing at all. Visually the error is handled. For a blind shopper the cart just silently changed, and the next thing they hear is a total that does not match the one they were quoted a minute ago.

WCAG 2.2 criterion 2.2.1, Timing Adjustable, is Level A. When a session has a time limit, the user must be able to turn it off, adjust it, or extend it, and a warning has to appear before expiry with at least 20 seconds to act on it. Checkout timeouts that silently clear a cart fail that criterion outright, and they fail screen reader and switch users first, because everything those users do takes more keystrokes.

WCAG success criterion 3.3.1, Error Identification, Level A, says that when an input error is detected automatically, the item in error must be identified and the error described to the user in text. A red outline with no words fails it. So does a banner reading please check the form. The compliant pattern is plain: name the field, say what is wrong, and, under 3.3.3 at Level AA, suggest the fix when one is known.

WCAG 2.2 success criterion 2.4.11, Focus Not Obscured (Minimum), at Level AA, requires that when a component receives keyboard focus it is not entirely hidden by author created content. Sticky headers, cookie bars, and chat bubbles are the usual offenders, and checkout is where they cluster thickest. A keyboard shopper who tabs to a Pay button sitting under a sticky bar cannot see where they are, and a focus indicator they cannot see fails the point of having one.

Why this criterion exists, in one checkout

Picture the tab order on a typical checkout: fields, delivery options, then the Pay button near the bottom of the viewport. The page scrolls as focus moves, and the sticky header, the announcement bar, and the chat widget together can cover a quarter of a laptop screen. The focused element scrolls to the top of the visible area, which is precisely underneath the sticky furniture. The shopper is pressing Tab into a covered region and taking the next step on faith.

The criterion is deliberately modest: at Level AA the focused component must not be entirely hidden. Partially covered passes 2.4.11, though the AAA version, 2.4.12, allows no covering at all. Modest or not, stores fail the minimum version daily, because nobody on the team tabs through checkout with the cookie bar still up.

The fix is a margin, not a redesign

Browsers scroll focused elements into view without knowing your header exists. CSS scroll margin is the correction: scroll-margin-top on focusable elements, set a little beyond the sticky header's height, tells the browser to stop that much earlier. It is a few lines of CSS, testable in an afternoon, and it survives redesigns better than JavaScript scroll hacks because it states the offset as a property of the layout.

WebAIM's keyboard guidance has made the underlying point for years: focus must be visible and the tab order logical, or the keyboard path does not exist in practice. Test with the real stack of furniture in place, cookie bar unaccepted, chat widget loaded, announcement bar showing, because that is the configuration your shoppers actually tab through.

Audit it like a shopper, not like a scanner

Automated tools are weak here; the failure depends on scroll position and overlapping elements, so it needs a person with a keyboard. Tab through the whole checkout at a normal laptop viewport and again at 200 percent zoom, where the sticky elements cover proportionally more. Note every stop where the focused element disappears wholly or partly, and check the Pay button and the error summary after a failed submission, which is where focus is sent programmatically and where obscuring does the most damage.

Record the failures by element, not by page. The fix list is usually short: one scroll margin rule, one chat widget that needs to stop floating over the payment section, one cookie bar that should not render on checkout at all. That last one is a business decision worth forcing, because the cookie bar is also covering the button for sighted mouse users on small screens.

Keep reading: A Checkout Error That Does Not Name the Field Is Not an Error Message, The Promo Code Field Fails 3.3.2 Before Anyone Types in It, and Your Checkout Session Timeout Is an Accessibility Failure Before It Is a Security Feature cover the nearby cases in this series.

Frequently asked questions

What does WCAG 2.4.11 actually require?

Focus Not Obscured (Minimum), a Level AA criterion new in WCAG 2.2, requires that when a user interface component receives keyboard focus, it is not entirely hidden by author created content such as sticky headers or banners. Part of the component must remain visible. The AAA version, 2.4.12, requires that none of it is hidden.

How do I fix a sticky header hiding focused elements?

Add scroll margin to focusable elements, for example scroll-margin-top set slightly larger than the sticky header's height. The browser then stops scrolling that much earlier and the focused element lands below the header instead of under it. Test it with cookie bars and chat widgets in place.

Can an automated accessibility scan find this problem?

Usually not reliably. Whether an element is obscured depends on scroll position and overlapping fixed elements at the moment of focus, which scanners do not reproduce well. A manual keyboard pass through checkout, including at 200 percent zoom, is the dependable test.

Does a cookie banner count as author created content?

Yes. Banners, sticky headers, chat widgets, and any other content the author places over the page are exactly what the criterion names. If the banner fully covers the focused element, the page fails 2.4.11 at that moment, whatever the banner's legal purpose.