Skip to content
easeweb
Search topics

Form success and error messages that are never announced

A newsletter form sends in the background and writes "Thanks! Check your inbox to confirm." into a plain paragraph, so the result is on screen and no screen reader hears it.

WCAG 2.2
SC 4.1.3AA· new in 2.1
Required by
EN 301 549 (EU)
Broken message.textContent = 'Thanks! Check your inbox to confirm.';
The accessibility problem illustrated: No vision:Did it go through?
01

The problem

Screen reader users press Subscribe and hear nothing, so they can't tell whether they signed up, and send it again or give up.

02

Try it

Press Subscribe and listen.

The panel under the form shows what a screen reader says. Is the result ever heard? Turn on “Sending fails” and press again, twice.

Broken Can you fix this?

BrokenA result written into a plain paragraph

Fernhill Books

New titles arrive every Thursday. Open daily, 9 to 6.

Screen reader says:

(Press Subscribe)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Write the result into a status region that was on the page before the send, and leave focus where it is.

  1. 1Write the result into a status region that is on the page before the send, and change only its words.
  2. 2Say both results in words: sent, and not sent.
  3. 3Leave focus on the button: don't move it to the message, or disable the button while the form sends.
Before A result written into a plain paragraph
<section aria-labelledby="signup-title">  <h2 id="signup-title">Sign up for our newsletter</h2>  <form id="signup">    <label for="signup-email">Email address</label>    <input id="signup-email" name="email" type="email" autocomplete="email" required>    <button>Subscribe</button>  </form>  <p id="signup-message"></p></section>
After A status line under the form
<section aria-labelledby="signup-title">  <h2 id="signup-title">Sign up for our newsletter</h2>  <form id="signup">    <label for="signup-email">Email address</label>    <input id="signup-email" name="email" type="email" autocomplete="email" required>    <button>Subscribe</button>  </form>  <p id="signup-message" role="status"></p></section>

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

04

Design ideas

A thank-you can be friendly, and still be heard.

Three ways to show that the sign-up went through. Press Subscribe in each: two say what happened in words a screen reader is also given, and one shows it only as a picture.

In the design file

  • Write both messages in full beside the form, the one for sent and the one for not sent.
  • Put the message under the button, where people look once they have pressed it.
  • Draw what the button shows while the form sends, at the width of its label and still looking like a button.
  • Write the ratios next to the message’s colours, at least 4.5:1 for its words.

Passes

  • A tinted note that repeats the address A pale teal note with an envelope opens under the field: “Almost done.” in bold, then “We sent a link to [email protected].” in the shop’s ink, 12.40:1. Showing the address lets people spot a typo at once. The words are written into a status line that is there before the press.
  • A button that shows the wait While the service answers, Subscribe keeps its width and teal, 9.08:1, and shows a small turning ring and “Sending…”; the ring stops when the answer comes. The result then appears under the form in the shop’s ink, written into a status line, because a focused button’s new label is read only in some setups.

Fails

  • Confetti and a button that turns into a tickWCAG 4.1.3 Subscribe shrinks to a round teal tick and a burst of confetti flies out and is gone in under a second. It feels like a reward, but the result is never put in words: a screen reader hears nothing, and with reduced motion only the tick is left. Add the sentence to a status line under it and the look can stay.
05

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the form component, its script or the embed changes.

Limits

Live regions behave differently across screen readers and browsers. This pattern covers one short form that sends in place and stays on the page. A design that replaces the form with a thank-you also removes the button that had focus, so a status line alone is not enough there: focus has to move to the thank-you, as forms replaced by a thank-you that is never announced shows. Actions that aren't forms, such as add to cart, are covered in Add to cart buttons that change a badge and say nothing, and search results that update in place in search and filter results that update without a word. Test your real forms, including embedded ones, with both a success and a failure and with the screen readers your users use.

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