Skip to content
easeweb
Search topics

Chat widgets that never announce their messages

A support chat keeps its messages in a plain div, so a screen reader never reads the greeting when the panel opens, or a reply when it arrives.

WCAG 2.2
SC 4.1.3AA· new in 2.1
Required by
EN 301 549 (EU)
Broken messages.append(bubble)
The accessibility problem illustrated: No vision:Did anyone answer?
01

The problem

Screen reader users don't hear a support chat's greeting when they open it, or its replies when they arrive.

02

Try it

Open the chat and send the message. What does a screen reader read?

  1. Press Tab to reach Chat with us, then Enter. Focus goes to the message field: is the greeting read with it?
  2. Press Enter to send the question, and watch the panel under the page for what a screen reader says when the reply arrives.
  3. Close the chat with Escape or the ×, and open it again: what is read now?

Broken Can you fix this?

BrokenA chat that reads neither the greeting nor the replies

Delivery

Most orders arrive within five working days. Large items are delivered on a day you choose.

Screen reader says:

(Open the chat and send the message)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Read the conversation with the message field when the panel opens, and add each reply to a log or live region that is already on the page.

  1. 1The conversation so far is read when the panel opens.
  2. 2Every reply lands in a region a screen reader watches, and focus stays where it is.
  3. 3The panel closes with a named button and with Escape, and focus goes back to the launcher.
Before A chat that reads neither the greeting nor the replies
<button type="button" class="chat-launcher">Chat with us</button><section id="chat" class="chat-panel" aria-labelledby="chat-title" hidden>  <div class="chat-header">    <h2 id="chat-title">Chat with Birchwood</h2>    <button type="button" class="chat-close" aria-label="Close chat">×</button>  </div>  <div class="chat-messages">    <p class="message from-us"><span class="visually-hidden">Birchwood: </span>Hi! How can we help with your order?</p>  </div>  <form class="chat-form">    <label for="chat-input" class="visually-hidden">Message</label>    <input id="chat-input" autocomplete="off">    <button>Send</button>  </form></section>
After

A log for the messages, read when the panel opens

<button type="button" class="chat-launcher">Chat with us</button><section id="chat" class="chat-panel" aria-labelledby="chat-title" hidden>  <div class="chat-header">    <h2 id="chat-title">Chat with Birchwood</h2>    <button type="button" class="chat-close" aria-label="Close chat">×</button>  </div>  <div class="chat-messages" role="log" aria-label="Messages">    <p id="message-0" class="message from-us"><span class="visually-hidden">Birchwood: </span>Hi! How can we help with your order?</p>  </div>  <form class="chat-form">    <label for="chat-input" class="visually-hidden">Message</label>    <input id="chat-input" autocomplete="off">    <button>Send</button>  </form></section>

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Verify the fix

5 checks, no mouse.

Test with: Screen reader, Keyboard

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 chat widget, its vendor's script or its settings change.

Limits

This is a starting pattern for a chat panel that sits over the page, not a guarantee for every widget. Live regions behave differently across screen readers and browsers, especially for regions that are hidden and shown, or inside frames, so test with the ones your visitors use. When a field's description is read also depends on the screen reader and its settings: most read it after the field's name, some only after a pause or with hints turned on. Auditors differ on whether each chat reply is a status message: the Understanding document for 4.1.3 lists role="log" for the progress of a process, and its technique uses a chat as the example. A reply that is never announced still leaves screen reader users waiting, whichever criterion it is counted under. The message field has a problem of its own when Enter sends: an input method's Enter can send the message before the word is confirmed, as fields that submit on Enter during IME conversion shows. Escape is used by an input method too, to cancel a conversion, so the Escape handlers above ignore a key pressed while a word is being converted.

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