Colors, logo and placement
Match the widget to your brand: colors, radius, font, logo, side of the screen and size.
On this page
The widget brings its own styles and never inherits your site's CSS, so it looks the same on every page. Theme it with options or with CSS variables.
Theme colors
Pass a theme object. primary colors the launcher, header and active states, and onPrimary is the text and icon color on top of it. Every key is optional.
CSS variables
When a CMS or tag manager adds the widget, theme it from CSS. The variables go on .a11yw-widget; --a11yw-hl on :root sets the outline color of the highlight adjustments.
Contrast checks
A console warning tells you when your theme makes part of the widget fail WCAG contrast. Only hex colors are checked.
onPrimaryonprimary: 4.5:1.primaryas the focus outline onbackground: 3:1.textandmutedTextonbackground, and footer links onsurface: 4.5:1.
Logo
icon replaces the launcher's icon and logo adds one next to the panel title. Both take an image URL or a DOM element. Pass only elements you trust: they are cloned as they are.
Position and size
The launcher sits in a bottom corner. When keyboard focus lands on a page control under it, it steps aside until focus moves on (WCAG 2.4.11), but it still covers that corner for mouse and touch users: keep it free, add bottom padding to your page, or move the launcher with offset.