Cookie Banners, Popups and Chat Widgets: Accessibility Traps

Updated · 8 min read

Short answer: Cookie banners, newsletter popups and chat widgets fail most often on focus management, keyboard dismissal, hidden content and contrast. Third-party tools still count as part of your site, so test them with a keyboard and a screen reader and raise problems with the vendor.

Cookie consent banners, newsletter popups and live chat widgets are some of the most common places where an otherwise sound website breaks for keyboard and screen reader users. They are added late, often by a marketing tool, and they appear on top of everything else, so a failure here can block the whole page.

This guide covers the recurring problems, how to test for them in a few minutes, and what to do when the widget belongs to someone else. It is general information, not legal advice. For legal questions, including how a demand letter applies to your situation, talk to an attorney.

Why these overlays cause problems

Banners, popups and widgets are injected by JavaScript after the page loads. That timing matters. The page's reading order, focus position and keyboard behavior were all designed without them, so the new element has to be wired in deliberately. When it isn't, you get the issues below.

They also tend to be the first thing every visitor meets. A broken cookie banner is not an edge case on a page, it is the front door.

Focus management

Focus is the element that currently receives keyboard input. A sighted mouse user can click anywhere, but a keyboard user moves through the page in sequence, so where focus lands when something appears is critical.

Focus never reaches the popup

A newsletter popup appears visually, but keyboard focus stays on the page behind it. The user keeps tabbing through links they can no longer see clearly, never reaching the popup's close button or form. A screen reader user may not even be told the popup exists.

Focus escapes a modal

If a popup is meant to block the page (a modal dialog), keyboard focus should stay inside it until it is closed. When Tab walks out into the page behind, users interact with content that is visually covered.

Focus is lost on close

When a popup closes, focus should return to a sensible place, usually the element that opened it, or the top of the page for an unprompted popup. If the closed popup is removed from the page and focus has nowhere to go, it may jump back to the start of the document, forcing the user to tab through the whole page again.

A small pattern that helps

For a modal, the native <dialog> element opened with showModal() handles much of this: it moves focus into the dialog, keeps focus contained, and supports closing with Escape.

<dialog id="newsletter" aria-labelledby="newsletter-title">
  <h2 id="newsletter-title">Get our newsletter</h2>
  <form method="dialog">
    <label for="email">Email address</label>
    <input id="email" type="email" autocomplete="email">
    <button type="submit">Subscribe</button>
    <button type="button" id="close-newsletter">No thanks</button>
  </form>
</dialog>

Test it in the browsers and assistive technology your visitors use rather than assuming it behaves identically everywhere.

Keyboard dismissal and operability

WCAG 2.1.1 Keyboard requires that everything you can do with a mouse can also be done with a keyboard. For popups, that has some specific consequences:

A keyboard trap is the worst case: focus enters the widget and cannot leave. Some chat widgets embed an iframe that captures focus and offers no way out. If a user cannot get past it with the keyboard alone, that is a serious barrier.

Focus not obscured

A sticky cookie bar or chat launcher can sit on top of the content a user is trying to reach. When a keyboard user tabs to a link or form field that is hidden behind a fixed banner, they can see nothing happening, even though focus is technically there.

This relates to WCAG 2.4.7 Focus Visible, which requires a visible focus indicator. WCAG 2.2 added a more specific criterion about focused elements not being entirely hidden by author-created content such as sticky banners. If you are weighing which version to target, see WCAG 2.2 vs 2.1. Even if you only target 2.1 AA, a focused control hidden behind your own banner is a usability failure worth fixing.

Practical checks and fixes:

Contrast and visibility

WCAG 1.4.3 Contrast (Minimum) sets minimum contrast ratios for text, and WCAG 2.1 also added contrast requirements for user interface components and graphics. Banners and popups regularly miss on:

Do not rely on a visual impression. Measure with a contrast checker, and check each state: default, hover, focus and disabled.

Third-party widgets are still your responsibility

Cookie consent platforms, popup builders and chat tools are usually supplied by a vendor. You did not write the code, but the widget appears on your website, and a visitor experiences it as part of your site. How legal responsibility is assigned in a particular situation is a question for an attorney, but practically, you should expect to be the one answering for what your pages do.

What helps:

Be cautious about quick fixes that promise to patch problems automatically. For background on why, see accessibility overlays and lawsuits.

Screen reader behavior

Visual appearance is only half the picture. A few things to confirm when you test with a screen reader (see screen reader testing basics):

A quick test routine

You can run this in about five minutes per widget.

  1. Load the page in a fresh browser session so the banner appears.
  2. Press Tab once. Does focus go to the banner or popup, or somewhere hidden?
  3. Tab through every control. Is the focus indicator always visible?
  4. Press Escape. Does a modal close?
  5. Activate the close or "Reject" control with Enter and Space.
  6. Check where focus lands afterward.
  7. Zoom to 200% and check nothing is cut off or covering the page.
  8. Repeat the key steps with a screen reader.

Common failures at a glance

ProblemWhat a user experiencesTypical fix
Focus stays behind popupCannot reach the popup by keyboardMove focus into it when it opens
Close button is a clickable <div>Cannot dismiss with keyboardUse a real <button>
No accessible name on "×"Announced as "button"Add a text label or aria-label
Sticky bar covers focusFocus is invisibleAdd scroll padding, shrink the bar
Low-contrast "Reject" linkHard to read the optionMeet contrast ratios
Chat iframe traps focusCannot leave the widgetFix with vendor or replace tool

Where this fits in a wider review

Overlays are one slice of a site. A full pass also covers headings, forms, images and navigation, as listed in the WCAG 2.1 AA checklist. If you have received a demand letter, read what to do with an ADA website demand letter and speak to an attorney. To see how filings are tracked, visit the federal filing tracker. When you are ready to check your own pages, you can run a free scan to find issues like these and keep a dated record of the results.

Frequently asked questions

Yes, in the sense that it is part of your web page, and visitors need to be able to use it. If a keyboard or screen reader user cannot accept, reject or dismiss it, they may be unable to use the rest of the site. Treat it like any other interactive component.

Who is responsible when a chat widget from another company is inaccessible?

Visitors experience the widget as part of your site, so you should expect to be asked about it. How responsibility is divided between you and a vendor depends on the facts and your contracts, so check with an attorney. In practice, test the tool, report issues to the vendor and keep records.

Should a popup close when I press Escape?

For a modal dialog, yes, that is the expected behavior and a common way keyboard users close it. There must also be a visible, labeled close button. Both options help people who use different input methods.

Can I just remove the popup instead of fixing it?

Often that is the simplest option, especially for newsletter popups, which many visitors find intrusive anyway. A sign-up form placed in the page content is easier to make accessible. Cookie banners may be needed for privacy reasons, so check requirements for your situation with a qualified professional.

Does passing an automated scan mean my banner is accessible?

No. Automated tools can catch some issues, such as missing labels or low contrast, but they cannot judge focus order, trapping behavior or whether the experience makes sense. Combine automated scans with manual keyboard and screen reader testing.

Proof of Access provides technical accessibility assessments. We are not a law firm and nothing on this page is legal advice. If you have received a demand letter or a lawsuit, talk to an attorney.