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 sees the focused button as in view, so it never moves it out from under.

WCAG 2.2
SC 2.4.12AAA· new in 2.2
Required by
Not required by Section 508 or EN 301 549
Broken
Focused, half under the chat button.
The accessibility problem illustrated.
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?

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

Reserve the launcher's corner with scroll-padding, or put the launcher in the layout instead of over it.

  1. 1No part of the focused control is under a fixed or sticky element, in either Tab direction.
  2. 2Space reserved for a floating element comes from its own size and offset, so the two stay in step.
  3. 3Translucent overlays count as covering: a fade over the focused control fails too.
Before A 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%;}
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);}

Fixing this with an AI coding assistant? Get this guide as Markdown

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. 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.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work