Skip to content
easeweb
Search topics

AI rewrite buttons that replace text with no preview or undo

An "Improve with AI" button on a profile writes its version over the person's saved About text at once, so promises they never made go live and their own words can't be brought back.

WCAG 2.2
SC 3.3.4AA
Required by
Section 508 · EN 301 549 (EU)
Broken about.value = text;
The accessibility problem illustrated: Cognitive:That's not what I said. Can I get my words back?
01

The problem

People who can't easily spot what a rewrite changed, or recall what they first wrote, have their own words replaced and saved, with no chance to compare them first or bring them back.

02

Try it

Press Improve with AI, then try to get your own words back.

Read what the new text promises. Could you keep what you wrote, or see both before it was saved?

Broken Can you fix this?

BrokenImprove with AI saves over the text at once

Your profile

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Show the rewrite beside the person's text and change nothing until they choose, or keep their words and a Restore button.

  1. 1Never let an AI button replace saved text with no way to compare it first or bring the original back.
  2. 2Show the rewrite next to the person's own words, or keep their words where one press restores them.
  3. 3Name each choice by what it does: Use this version, Keep mine, Restore my text.
Before Improve with AI saves over the text at once
<label for="about">About you</label><textarea id="about" name="about">I do the books for small shops and cafés, part-time, in the evenings. I reply to messages within two days.</textarea><button type="button" id="improve">Improve with AI</button>
After

Show the rewrite, and change nothing until it is chosen

<label for="about">About you</label><textarea id="about" name="about">I do the books for small shops and cafés, part-time, in the evenings. I reply to messages within two days.</textarea><button type="button" id="improve">Improve with AI</button><div id="suggestion" hidden>  <h2>Suggested by AI</h2>  <p id="suggested-text"></p>  <p>Your text above stays as it is until you choose. Check that this still says what you mean.</p>  <button type="button" id="use">Use this version</button>  <button type="button" id="keep">Keep mine</button></div>

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

04

Design ideas

An AI rewrite can look new and still leave the choice with the person.

Four more ways to draw the moment after the AI button, and two fashionable ones that fail. Press their buttons and Tab to them: four keep the person’s own words within reach, and two lose them.

In the design file

  • Draw the screen just after the AI button is pressed, with the person’s own text still in view.
  • Name each button by what it does, such as Use this version, Keep mine or Restore my text.
  • Mark changed words with a strike-through and an underline, not colour alone, and keep the text on each tint at 4.5:1 or more.
  • Draw the phone layout, with both versions and every button reachable.
  • Put the way back where the change was made, and never on a timer.

Passes

  • About you
    Part-time, in the evenings.Available any time. I reply within two daysthe hour.
    Tracked changes in the box Removed words struck through on a pale red, new words underlined on a pale green, with Accept and Reject at the end. The person sees exactly which promises changed; the text is 6.44:1 and 6.49:1 on its tint.
  • About you
    Available any time. I reply within the hour.
    A Mine | AI switch on the box Both versions are kept for good, one tap apart, so comparing is a tap and nothing is lost. The selected one is what clients read, so the AI version is public until the person switches back.
  • About you

    Live: Part-time, in the evenings. I reply within two days.

    Draft · AI Available any time. I reply within the hour.
    Rewrite as a draft The AI’s text goes into a draft with a Draft badge, 6.95:1 on its yellow, and the live profile keeps the person’s words until they publish. Suits anything public: profiles, listings, posts.
  • About you
    Available any time. I reply within the hour.
    “Edited with AI” and its versions A quiet line under the box opens the earlier versions, each with Restore. Light at rest, and every change can be taken back; the line stays until the person edits the text.

Fails

  • About you
    Part-time, in the evenings. I reply within two days.
    Shimmer that turns into the new textWCAG 3.3.4 The sweep shows that something changed, and it stops, but the old text is gone and already saved: nothing to compare and no way back.
  • About you
    Part-time, in the evenings. I reply within two days.
    Undo in a toastWCAG 3.3.4 “Rewritten with AI · Undo” slides in and goes after 5 seconds, and the way back goes with it. Anyone slower to read the new text, or to reach the toast, keeps the rewrite.
05

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom

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 AI feature, its prompt or the editor changes.

Limits

This is a starting pattern, not a guarantee for every product. The example is a profile's About text; drafts, listings, messages, notes and documents need the same care wherever an AI button writes into text that is kept. A suggestion step only helps people who read it: the model can still be wrong in ways the person doesn't notice. Whether AI-written text must be labelled for its readers is outside WCAG. Test the complete feature, including the shortcuts and menus that apply a rewrite, with the people and tools your users rely on.

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