How-to Guide

When a Sticky Header or Cookie Banner Hides the Link a Keyboard User Reached

Short answer

Press Tab through your page with the sticky header and cookie banner showing. If the link or button you land on slides out of sight behind them, a keyboard user is lost. The fix is usually a small style change that leaves room around the fixed bars.

By Gio LaRocheUpdated 5 min read
Get my free auditor call (561) 291-2681

Tabbing into the dark

Some patients move around your site with the Tab key instead of a mouse. They may use a keyboard, a switch, or voice commands that act through the keyboard. Each press of Tab moves a highlight to the next link or button, and the person follows that highlight with their eyes. If the highlighted item scrolls up under a header that stays fixed to the top of the screen, the person is left looking at a page where nothing seems selected.

The W3C says as much in its Focus Not Obscured (Minimum) page, which we read in full before writing. Where people cannot see the item with focus, they may not know how to proceed or may think the page has stopped responding.

What the rule asks

The criterion says that when a component receives keyboard focus, it must not be entirely hidden by content the author created. At this level it can be partly covered. The W3C is clear that the more is covered, the harder it is to see, and that the best outcome, covered by a stricter level, is none of it hidden.

The page names the usual causes: sticky footers, sticky headers and non-modal dialogs. It gives a direct example for practices to note. A cookie banner built as sticky content fails the criterion if it entirely covers an item that receives focus.

Fixed elementWhere it often goes wrong
Header bar with a phone buttonA link scrolled to the top edge slides under the bar
Cookie or consent banner at the bottomThe submit button sits behind the banner when tabbed to
Floating chat buttonIt sits over the last field of a form
Sticky call strip on a phoneIt covers the footer links reached by Tab

A ten-minute test with the fixed elements showing

  1. 1Open your home page in a private window so the cookie banner appears, and leave it showing.
  2. 2Click once on a blank part of the page, then keep pressing Tab and watch the highlight, not the page.
  3. 3Whenever the highlight vanishes, note the page address and which fixed bar covered it.
  4. 4Repeat on the contact page, going through every form field down to the submit button.
  5. 5Narrow the browser window to about the width of a phone and run the same pass, because bars take more space there.

Which fixes the W3C names

The page lists ways to pass. One is making the banner modal, so the visitor must deal with it before moving through the page. Another is adding space with a style setting called scroll padding, which keeps scrolled items clear of the fixed bar. A third is letting a notification close when focus leaves it. Its list of sufficient techniques is that one scroll padding method, and its failure example is a sticky header or footer completely hiding focused elements.

What to hand your web person

Send the list from your test with page addresses and a note on which bar caused each case. Ask for the fix to be checked again by tabbing through the same pages. Our guide on keyboard focus outlines and tab order on the booking and contact pages covers whether the highlight is visible at all, and the one on pop-ups, banners and chat widgets on a phone page covers the overlays themselves. We do not give legal advice, and this check does not by itself make a site conform to any standard.

Frequently asked questions

Is it a failure if the item is only partly covered?

At the AA level of the W3C criterion, partly covered is allowed, while entirely hidden is not. The page still advises designing so that little or none of the focused item is covered, because a half-hidden button is harder to follow.

Does this apply to a menu a visitor opens on purpose?

The W3C says content opened by the user may cover a focused item without failing, if the person can reveal the item without moving focus onward. A chat window left open that stays on top can still cause trouble, so test it too.

Can a cookie banner be made to pass?

Yes. The W3C says ways to pass include making the banner modal, so it must be dismissed first, or using scroll padding so it does not overlap other content. Banners that need no response can also close when focus moves away.

Who should fix it, our web person or the plugin maker?

Start with whoever manages the site, since many fixes are a single style rule. If the banner comes from a plugin or a vendor script, send the maker the page address and the step where the highlight disappears, and keep a copy of your note.

Will fixing this help the practice get more bookings?

We cannot promise a number. It removes one way a keyboard user loses their place before reaching the contact button. Count your submitted forms for a month before and after, and keep in mind that other things change at the same time.

Sources

Keep reading

Ready to Grow Your Practice?

Primara is now accepting new independent practices nationwide. Most new engagements begin within one week.

Send Us a Message

We respond within one business day.

* Required field

We'll call to confirm your consultation.

No spam, ever. HIPAA-aware agency. We respond within one business day. For urgent inquiries, call (561) 291-2681.

Founder-LedHIPAA-AwareServing Practices Nationwide