Repository navigation
Accessibility
The widget is built to work with a keyboard and a screen reader out of the box.
-
Labelled form. Every field has a visible
<label>. The panel is a labelled region with a real heading. The hint text is linked to the form witharia-describedby. -
Errors are announced. A validation message uses
role="alert"; notices such as "invalid phone number" and the offline message userole="status". -
Launcher state. The launcher exposes
aria-expandedandaria-controls. In the icon-only variant the label stays available to screen readers as visually hidden text. - Keyboard. Tab and Shift+Tab move through the panel. Opening moves focus to the first field. Escape closes the form and returns focus to the launcher.
-
Agent picker. A native radio group inside a
fieldsetwith a legend, so arrow keys and screen reader announcements work as people expect. Each agent's status is read as part of the option. - Status is not only color. "Online" and "Offline" are written out, and the dot is filled or hollow.
- Contrast. The built-in themes keep text at 4.5:1 or better against its background, including the dark theme and the status text.
-
Decorative elements are hidden. The WhatsApp icon, avatars with initials, and the notification dot use
aria-hidden. - Motion. Transitions are removed when the visitor prefers reduced motion.
- Right-to-left. Layout mirrors for RTL languages.
-
Live chat. The conversation is a named
role="log"region witharia-live="polite", so replies are announced without interrupting. It is keyboard focusable, the composer has a hidden label, and Enter sends only when no IME composition is in progress. Delivery state is written out (Sending…, Sent, Delivered, Not sent) and a failed message has a Retry button. -
AI helpers. "Polish with AI" is a real button that reports its busy state with
aria-busy. Screen readers hear a status message when the text is replaced, and Undo is a button right next to it. Instant replies are announced as a status and have two clear, keyboard-reachable buttons. - Browser popups. When the browser needs a fresh click before it will open WhatsApp, an Open WhatsApp link appears instead, so nothing is silently blocked.
The automated test suite runs axe-core against the closed launcher, the open form with agents, business hours and an offline notice, and the icon variant with a greeting and notification dot. It runs the same checks on the live chat thread, the AI toolbar and the instant reply view. It also tests keyboard behavior (focus on open, Escape to close, focus return).
Automated tools cannot judge everything. They do not check color contrast in jsdom and cannot tell whether the experience makes sense with a real screen reader, so the contrast figures above were calculated separately from the theme colors. If you find a barrier, please open an issue.
-
Custom colors. If you set
accentColoror--wa-primary, make sure text on that color is readable (WCAG AA asks for 4.5:1 for normal text). -
Translations. Translate every visible string (see Right-to-Left and Translations) and set the page
lang. - Page context. If you collect page and campaign data, say so in your privacy information.
- Webhooks, AI and live chat. These send the visitor's name and message to your servers (and, for AI, your AI provider). Say so in your privacy information. See Lead Webhooks and Bring Your Own AI.
-
Overlap. Make sure the launcher does not cover important content or controls on small screens. Use
offsetorpositionto move it. - Popups. The widget opens WhatsApp in a new tab when the visitor presses the submit button. It never opens anything on its own.
If you want a quieter widget: skip greeting and showNotificationDot, and avoid very short showAfter values. The widget never auto-opens unless you pass defaultOpen or isOpen.