settings object of your embedding code. Both JSON locations accept the same keys. For the complete list of settings and their default values, refer to the Webchat embedding documentation on GitHub.
Configure the endpoint
Configure settings in JSON
Translate aria labels and screen reader texts
Webchat has aria labels to give screen readers and other assistive technologies access to non-visible text. By default, the aria label texts are in English. If your Webchat is used in another language, translate the aria labels and the texts that are announced to screen readers. Otherwise, screen reader users hear English control names and announcements in a conversation that is held in their language. Because these texts aren’t visible, a missing translation is easy to overlook in visual testing. Check them with a screen reader. For more information, see Test accessibility. Two groups of settings control these texts:customTranslationscontains texts that are displayed in the Webchat UI. Some of them are also announced to screen readers, for example, the connection-lost message, the delete confirmation, and the file upload failure reasons.customTranslations.ariaLabelscontains texts that are never displayed. They are available only to screen readers and other assistive technologies, as aria labels of controls, as visually hidden texts, or as live region announcements. They include, for example, the names of icon-only controls such as the launcher, close, and send buttons, the message header texts, the descriptions of image, audio, video, and file messages, the file upload announcements, and the Datepicker labels.
{name}, {time}, {fileName}, and {count}. Webchat replaces a placeholder at runtime with the actual value, for example, the name of the agent, the time a message was sent, the name of an uploaded file, or the number of files. Translate only the words around a placeholder and keep the placeholder itself unchanged. For example, the default message header text {name} said: becomes {name} sagt: in German, and Webchat announces it as Support chat sagt:.
Add the translations to the Webchat Custom Settings field of the endpoint or to the settings object of your embedding code.
Custom Settings sample
Custom Settings sample
Activate the launcher animation pause button
If you select an Icon animation for the Webchat launcher in the endpoint, also activate the pause button. The pause button appears at the edge of the launcher when the user hovers over or focuses the launcher, and is always visible on touch devices. It lets users stop the animation without opening Webchat, as required by WCAG success criterion 2.2.2 for animations that repeat for more than five seconds. The pause button is disabled by default. The endpoint has no option for it, so you can activate it only in JSON. Add the following to the Webchat Custom Settings:
Configure focus behavior
The following settings change how keyboard focus moves. They are available only as JSON.Keep custom styling accessible
Maintain color contrast
By default, Webchat adheres to color contrast guidelines, ensuring a clear difference in brightness between a text and its background. If you customize the colors in the Colors section on the Layout tab in the endpoint settings or through CSS customization, ensure that the text and icons remain visible:- The minimum contrast ratio for normal text is 4.5:1.
- For large text, UI components, and focus indicators, the contrast ratio must be at least 3:1.
- If you add a background image to the Home Screen, ensure that the welcome text and the Conversation Starters remain readable, for example, by adding an overlay or gradient.
Configure text resizing
Webchat supports relative font sizes, so users can adjust the font size in their browser settings. If you customize the font size in your Webchat widget, make sure that both the Webchat CSS customization and the HTML code of your website work properly with relative font sizes:- Use relative font size units, for example,
emorreminstead ofpx, in the Webchat CSS customization options. - Avoid absolute pixel values in the HTML tag that embeds the Webchat widget, or set
font-sizeto100%. For more details, refer to the Webchat v3.25.0 release notes. - For readability, avoid body text smaller than 12px.
Configure the web page that embeds Webchat
The web page that embeds Webchat, not Webchat itself, meets some WCAG success criteria:- Set the
langattribute of the<html>element to the language of the conversation (success criterion 3.1.1). - Give the page a descriptive title (2.4.2).
- Place the Webchat launcher in the same position on every page that offers it as a help or contact option (3.2.6).