C6.24.4Visible one-step undo for auto-formatdesignresearch

Automatic changes must be visible and undoable in one step, or people will wonder whether they mistyped

Aliases: format undo · visible autocaps · misattributed typos

What it is

Once autocapitalization or auto-format mutates the buffer, people must see that the system just acted, and a single undo must restore the code points they actually typed. If the change is unmarked and undo also deletes the previous few letters, curly quotes, a raised I, or a sudden dash get attributed to a wrong key. The requirement is reversibility of case and format transforms, not “restore original word” on a spelling chip.

Why it happens

People calibrate an internal model against “what I pressed.” Silent rewrite cuts that calibration; when the new glyph resembles the old, attribution leans toward the self. If the undo stack merges “typed two dots + swapped to a dash” into one unit, one undo discards a hyphen the user still wanted; if it is too fine, they must mash undo to peel the format off. Visibility can be a brief wash, a badge by the caret, or a Shift flash on the keyboard. One-step undo should roll back only that automatic transform and re-expose the straight quote or lowercase, not clear the sentence. Autocorrect undo targets a swapped word; here the target is a swapped mark or case bit. Sharing a vague “undo typing” makes it unpredictable which layer rewinds.

Studying it

In editors with and without highlight, and with and without a distinct undo unit, type sequences that trigger formatting, then ask to “restore the characters I just typed.” Record one-shot success, an attribution question (self versus system), and whether the buffer after undo equals the pre-trigger state. Eye tracking can show whether gaze was on the caret at the moment of change. Do not use misspelled words as materials.

Where it stops holding

In co-editing, someone else's auto-format is not something your one-step undo can handle; that needs versions or suggestion mode. Rewriting an uncommitted IME pinyin string makes undo semantics even messier; forbid smart punctuation during composition. Speech-to-text sentence caps may come from the recognizer, so undo might have to roll back a whole recognition, a different grain. Assistive-tech users depend on a change announcement; a visual flash alone is invisible to them.

Applying it

  • When autocaps or smart punctuation fire, briefly mark the changed character and make the undo key roll back only that transform.
  • Label the transform as its own undo action; do not merge it with neighboring keystrokes.
  • Screen readers should speak “changed to a curly quote” or “capitalized,” not stay silent.
  • Verify: after -- becomes a dash, one undo should restore two hyphens with surrounding letters intact; then ask “did you mistype, or did the software change it?” The target answer is the software.

Related

  • Same group: C6.24.1 Autocapitalization assumes English sentence boundaries and misfires in other settings · C6.24.2 Auto-formatting changes already-typed content without the user noticing · C6.24.3 Auto-formatting often backfires on proper names and code and needs an off switch
  • Adjacent: C6.16 Undo in text input · C6.11 Autocorrect
  • Search: undo autoformat · visible capitalization · error attribution

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/C6.24.4