On this page
What this issue is
A cookie banner (also called a consent banner) asks visitors to accept or reject cookies. It is not keyboard accessible when someone who uses only a keyboard, a switch device or voice control can't operate it. Typical causes: buttons built from <div> or <a> tags with no keyboard support, a banner added at the very end of the page so Tab reaches it last, a banner that covers the page while focus stays behind it, or a banner with no visible focus outline.
This relates to WCAG 2.2 criteria such as 2.1.1 Keyboard, 2.4.3 Focus Order, 2.4.7 Focus Visible and 2.4.11 Focus Not Obscured. WCAG is the Web Content Accessibility Guidelines, the standard most accessibility laws point to.
Why it costs you leads or sales
People who navigate by keyboard can get stuck behind the banner, unable to reach your form, menu or checkout. They leave. If they can't press Accept, your consent-based tags (analytics, ads) may never fire, so you also lose measurement for those visits. Inaccessible consent controls can also raise legal and compliance risk.
- Land on pageBanner appears over content
- Press TabFocus goes to page behind the banner or skips it
- Accept or rejectButtons can't be reached or activated
- Fill form / checkoutCovered by the banner
The banner can't be operated, so everything after it is lost.
How to check if your site has it
Do this in a private window with cookies cleared, so the banner shows. Put your mouse aside and use only the keyboard.
Reload and press Tab
Watch where the focus outline lands. It should reach the banner within the first few Tab presses, or the banner should take focus when it opens.
Tab through every banner control
Accept, Reject, Settings, links to the policy and any toggles must all be reachable, each with a clearly visible outline.
Activate with Enter and Space
Buttons should work with both keys. Toggles should work with Space.
Press Escape and Shift+Tab
Check you can go backwards and that you are never stuck inside the banner without a way out.
Check what happens after choosing
The banner should close and focus should move to a sensible place, not vanish into nowhere. The page behind must then be fully usable.
Try a screen reader
Use NVDA (Windows), VoiceOver (Mac/iOS) or TalkBack (Android). Buttons should be announced as buttons with clear names.
How to fix it
Most banners come from a consent plugin or platform. First check its settings and update it. If it is a custom banner, use the markup below. Never fix this by removing the banner if you need consent.
Update the consent plugin
Update your cookie plugin and theme. Accessibility fixes often ship in updates.
Review banner settings
Look for options for position, overlay and button style. Avoid settings that render the banner as a bare link or image.
Retest with the keyboard
If the plugin still fails, contact its support with your test results or switch to a plugin that passes.
Check the consent source
Shopify's built-in banner is under Settings > Customer privacy. If you use an app, open its settings.
Update or replace the app
If the app's buttons can't be reached with Tab, update it or choose another and retest.
Check your custom HTML tag
If the banner is injected through a Custom HTML tag, replace div-based controls with real buttons using the snippet below.
Keep consent mode intact
Make sure the Accept and Reject buttons still update your consent settings after you change the markup.
Use Button elements
If you built the banner in the Designer, use Button or Link Block with a proper label, not a Div Block with an interaction.
Fix the order
Move the banner near the top of the Navigator so it comes early in the tab order, or manage focus with custom code.
Check the banner source
If you use a custom script or third-party tool, test it. If it is built in a custom code block, apply the snippet below.
Review the cookie banner settings
In the Wix editor, open Settings > Cookie Consent Banner (menu names can change). Test the live site with the keyboard.
Report gaps
If controls can't be reached, contact Wix support or use an accessible third-party consent tool.
Check the built-in banner
Look under Settings > Cookies & Visitor Data. Test it with Tab and Enter on the live site.
Use an alternative if needed
If it fails, use an accessible consent tool added through code injection.
Use real buttons
Replace clickable divs and spans with <button type="button">.
Place it early and label it
Put the banner early in the DOM and give it a role and accessible name, as in the snippet below.
Show focus
Never remove outlines without a replacement style.
<div id="cookie-banner" role="region" aria-label="Cookie consent">
<p id="cookie-text">We use cookies to measure traffic and improve the site. <a href="/privacy">Privacy policy</a></p>
<button type="button" id="cookie-accept">Accept all</button>
<button type="button" id="cookie-reject">Reject all</button>
<button type="button" id="cookie-settings">Cookie settings</button>
</div>
<script>
var banner = document.getElementById('cookie-banner');
function closeBanner() {
banner.hidden = true;
document.querySelector('main, body').setAttribute('tabindex', '-1');
(document.querySelector('main') || document.body).focus();
}
document.getElementById('cookie-accept').addEventListener('click', closeBanner);
document.getElementById('cookie-reject').addEventListener('click', closeBanner);
</script>#cookie-banner button:focus-visible,
#cookie-banner a:focus-visible {
outline: 3px solid #1a56db;
outline-offset: 2px;
}
#cookie-banner {
position: fixed;
bottom: 0;
left: 0;
right: 0;
max-height: 40vh;
overflow: auto;
}Not accessible
- Accept is a styled <div> with a click handler
- Banner is added at the end of the page
- No visible focus outline
- Banner covers the form fields
Accessible
- Accept and Reject are real <button> elements
- Banner is early in the tab order and labelled
- Clear focus outline on every control
- Compact banner, focus moves on after choosing
How to confirm it's fixed
- Tab reaches every banner control in a logical order
- Enter and Space activate buttons
- Focus outline is clearly visible on each control
- After choosing, the banner closes and focus lands in the page
- No keyboard trap: Shift+Tab and Tab both still work
- Screen reader announces each button by name
- Consent choice is still saved and tags respect it
- Retested on mobile with an external keyboard or screen reader
How to prevent it happening again
Add the keyboard test to your release checklist, and rerun it after any theme, plugin or consent tool update, or after a redesign. When choosing a consent tool, test its demo with the keyboard before buying. Run an automated accessibility scanner (such as axe or Lighthouse) regularly, but remember scanners can't catch every focus issue, so keep the manual test.
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs your customer journeys (forms, checkouts, booking and chat buttons) on a schedule and checks steps, tracking hits and lead delivery. It does not audit keyboard accessibility. The kind of tool that fits is an accessibility testing tool: an automated scanner such as axe DevTools or Lighthouse for a first pass, plus a manual keyboard and screen reader test, or an accessibility audit by a specialist.
Once your banner is fixed, FunnelGuard can still help with related money-side problems, such as checking that your forms and tracking keep working. You can start with the Free plan (1 site, 2 journeys, daily checks, no card).
Questions people ask
Why is my cookie banner not working with the keyboard?
Usually the buttons are not real <button> elements, or the banner is placed so late in the page that Tab reaches it last. Another common cause is that the focus outline is removed. Switch to real buttons, move the banner earlier in the page and restore a visible focus style.
How do I test if my cookie banner is keyboard accessible?
Open the site in a private window so the banner shows, then use only the keyboard. Press Tab to reach every control, Enter or Space to activate them, and Shift+Tab to go back. You should always see where focus is and never get stuck.
Does a cookie banner need to meet WCAG?
Yes, a cookie banner is part of your page, so WCAG criteria such as Keyboard (2.1.1), Focus Order (2.4.3) and Focus Visible (2.4.7) apply to it. Many accessibility laws refer to WCAG. Check which rules apply in your country.
Should a cookie banner trap keyboard focus?
Only if it is a true modal that blocks the page, and then focus must be managed so users can always accept, reject or close it. A non-blocking banner should not trap focus. In either case, nobody should be stuck with no way out.
Where should the cookie banner be in the tab order?
Early, so keyboard users meet it before the rest of the page, or it should receive focus when it opens. A banner placed at the end of the HTML forces users to tab through the whole page first.
Can an accessible cookie banner still be compliant with consent rules?
Yes. Accessibility concerns how people operate the controls, not what you ask. Make sure the Accept and Reject choices are equally easy to use by keyboard, and that your tags respect the choice. Check consent law requirements with a professional.
Does FunnelGuard check cookie banner keyboard accessibility?
No. FunnelGuard monitors funnels such as forms, checkouts and tracking, not accessibility. Use an accessibility scanner like axe or Lighthouse and a manual keyboard test for this issue.
Related issues
- PRF-311Focus outline removed (outline:none)Fix guide
- PRF-312Keyboard trap in modal or widgetFix guide
- PRF-313Form cannot be completed with keyboard onlyFix guide
- PRF-314Illogical focus orderFix guide
- PRF-315Focus not moved into opened modal / not returned on closeFix guide
- PRF-316Focused element hidden behind sticky header (WCAG 2.4.11)Fix guide