Preserving input after an error
An error, a back step or a timeout that wipes what people typed makes them do the work twice, or give up.
The answer
Never make people type something twice. Keep what they entered through errors and back steps. As strong as the weakest rule behind it: weak.
-
Don’t ask for something twice in the same process. Fill it in, or let people pick it.
WCAG 2.2 level A (3.3.7). Reopened and checked.
- Applies when
- Information was entered earlier in the same process.
- Based on
- Standard or law
- Principle
- Recognition over recall
- StandardStandard: Understanding SC 3.3.7 Redundant EntryW3C WAI
-
When you show an error, keep everything people entered, in every field.
GOV.UK, Primer and Baymard agree, and Baymard reports abandonment after card fields were cleared, without numbers. A guideline study lists it but never tested it. Rated 3.
- Applies when
- A submit was rejected.
- Based on
- Convention
- Principle
- Keep people in control
- Common mistake
- Clearing a whole form, or its password or card fields, after one field fails.
- ExperimentExperiment: Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement GuidelinesSeckler, 2014
- User researchUser research: Preserve credit card details when a validation error occursSonia Sousa, 2024
- GuidanceGuidance: Help users to recover from validation errors (Validation pattern)GOV.UK Design System
- Guidance: Saving (UI pattern)GitHub Primer
-
When people go back a step, show what they entered there.
USWDS guidance; Baymard's detail on back steps is in paid research. Rated 2.
- Applies when
- The form has steps.
- Based on
- Convention
- Depends on
- Length of the form
- Principle
- Keep people in control
- User researchUser research: Preserve credit card details when a validation error occursSonia Sousa, 2024
- GuidanceGuidance: Patterns: Complete a complex form, Progress easilyU.S. Web Design System
The other rules
-
If a session times out, warn people first and let them extend it.
WCAG 2.2 level A (2.2.1), with exceptions for limits that are essential. Reopened and checked in the pilot.
- Applies when
- The session has a time limit.
- Based on
- Standard or law
- Principle
- Work for everyone
- Common mistake
- A timeout that discards everything with no warning.
- StandardStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
-
When a session ends, keep the answers so people can continue after signing in again.
A WCAG level AAA criterion and W3C cognitive accessibility guidance; AAA sets no floor here. Rated 2.
- Applies when
- The session has a time limit.
- Based on
- Convention
- Principle
- Keep people in control
- StandardsStandard: Understanding SC 2.2.5 Re-authenticating (Level AAA)W3C WAI
- Standard: Cognitive Accessibility Design Pattern: Avoid Data Loss and "Timeouts"W3C WAI Cognitive and Learning Disabilities Task Force
Accessibility
- WCAG 2.2 · 3.3.7WCAG 2.2, 3.3.7 Redundant Entry (A) and 2.2.1 Timing Adjustable (A).
- WCAG 2.2 · 2.2.5WCAG 2.2, 2.2.5 Re-authenticating and 2.2.6 Timeouts (both AAA): no data loss on re-authentication; warn about inactivity that loses data unless data is kept 20 hours or more.
- WCAG 2.2 · 3.3.4WCAG 2.2, 3.3.4 (AA) for legal and financial submissions.
Open questions
- OpenNo controlled study or published online experiment on lost input was found.
- OpenWhether to keep sensitive fields such as a card security code after an error: sources differ and cite security, not behavior.
Checked November 12, 2026
Sources
- ExperimentExperiment: Designing Usable Web Forms: Empirical Evaluation of Web Form Improvement GuidelinesSeckler, 2014
- User researchUser research: Preserve credit card details when a validation error occursSonia Sousa, 2024
- StandardsStandard: Understanding SC 3.3.7 Redundant EntryW3C WAI
- Standard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- Standard: Understanding SC 2.2.5 Re-authenticating (Level AAA)W3C WAI
- Standard: Cognitive Accessibility Design Pattern: Avoid Data Loss and "Timeouts"W3C WAI Cognitive and Learning Disabilities Task Force
- GuidanceGuidance: Help users to recover from validation errors (Validation pattern)GOV.UK Design System
- Guidance: Saving (UI pattern)GitHub Primer
- Guidance: Patterns: Complete a complex form, Progress easilyU.S. Web Design System
Related
- When to validate a form fieldCheck on submit, and do not show an error until people have finished the field.Answer: moderate.
- Error message contentSay which field is wrong and how to fix it, right next to the field.Answer: strong.
- Saving and resumingWhen a form needs things people may have to go and find, let them save and come back.Answer: moderate.
- Time limitsAvoid time limits. Where one is needed, warn before it ends and let people extend it.Answer: moderate.