Skip to content
easeweb
Search topics

Floating chat buttons that cover part of keyboard focus

A chat launcher fixed in the corner sits over the end of each row as the page scrolls, and the browser never moves the focused button out from under it.

WCAG 2.2
SC 2.4.12AAA· new in 2.2
Required by
Not required by Section 508 or EN 301 549
Broken
The accessibility problem illustrated: Motor:What's under the chat button?
01

The problem

Keyboard users reach a button that a floating chat launcher half covers, so they cannot be sure what is focused or what it says

02

Try it

Press Tab down the workshop list, then Shift + Tab back up

Watch each Book button as it gets focus. Can you see all of it, or does the chat button sit over part of it?

Broken Can you fix this?

BrokenA floating launcher with nothing reserving its space
Community Centre
  • Bread baking basics
  • Intro to watercolour
  • Repairing a bicycle
  • Knitting for beginners
  • Container gardening
  • Basic first aid
  • Pottery wheel taster
  • Photo editing on a phone
  • Sewing a tote bag
  • Home energy saving

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Keep the chat button from covering keyboard focus

Before
BrokenA floating launcher with nothing reserving its space
.chat-launcher {  position: fixed;  inset-inline-end: 1rem;  bottom: 1rem;  inline-size: 3.5rem;  block-size: 3.5rem;  border-radius: 50%;}
What is wrong3 points
  • Part of the page is hidden in the bottom-right corner. The launcher covers the bottom 4.5rem of the window's right side, and the page scrolls under it.
  • A focused button can stay half hidden. The browser considers it already in view, so it doesn't scroll.
  • The last row's Book button can never be seen in full. The page can't scroll it above the launcher.
After

Scroll-padding the launcher's corner

:root {  --launcher-size: 3.5rem;  --launcher-inset: 1rem;  /* The launcher, its offset from the edge, and a small gap above it. */  --launcher-reserve: calc(var(--launcher-size) + var(--launcher-inset) + 0.5rem);}.chat-launcher {  position: fixed;  inset-inline-end: var(--launcher-inset);  bottom: var(--launcher-inset);  inline-size: var(--launcher-size);  block-size: var(--launcher-size);  border-radius: 50%;}html {  scroll-padding-bottom: var(--launcher-reserve);}/* Let the last row scroll above the launcher. */main {  padding-bottom: var(--launcher-reserve);}
How it is fixed3 steps
  1. Put the launcher's size and offset in tokens, and work out a reserve from them: the launcher, its offset from the edge, and a small gap above it.
  2. Set scroll-padding-bottom on html to the reserve. It tells the browser that the bottom strip of the window is not really visible, so a control that receives focus there is scrolled up until it clears the launcher.
  3. Pad the end of main by the same reserve. That gives the page enough height to do the same for the last row.

This fixes the Before and passes 2.4.12. The padding comes from the same tokens as the launcher, so they stay in step, but only while the launcher keeps that size: if it grows into a wider "Chat with us" pill, or opens into a panel, the reserve must grow with it, and if a cookie banner shows below it, the two heights add up. The reserve takes a full-width strip, so it also costs some room on short windows.

04

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Zoom

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the launcher, banners or page layout change.

Limits

This is a starting pattern, not a guarantee for every application. Level AAA criteria are not required for whole sites, and some content cannot meet them, but this one is usually cheap to meet. Browsers apply scroll-padding to focus scrolling in their current versions, but check yours, and check scroll containers inside the page, which each need their own padding. A floating bar that wraps onto a second row when the page is zoomed in outgrows its reserve the same way; see floating buy bars that cover the page when zoomed in. Token names in the snippets are placeholders for your own design tokens.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service