VOCABULARY / ENTRY
Error Prevention
error-prevention
Good error messages matter, but a better design stops the problem before it happens: it eliminates error-prone conditions, or checks for them and offers a confirmation before the user commits. Errors split into unconscious slips and mistakes rooted in a wrong mental model, and the two need different prevention tactics.

Recognizing it
- Input is constrained to valid values, or offered sensible defaults and suggestions
- Costly or irreversible actions are checked, confirmed, or reversible before they take effect
- The strength of prevention scales with the cost of the error rather than being applied uniformly
Concept boundary
Error prevention is about design before an error occurs. It is not error messages and recovery (Nielsen's ninth heuristic); inline validation is only one realization of it, not the principle itself; and it does not call for a confirmation on every action.
When to consider it
- An action causes costly consequences such as legal commitments, financial transactions, or deleting or modifying data
- Input has a clearly defined valid range, such as dates, quantities, or formats
- Users perform practiced, automatic actions where attention drifts and slips happen
When to be cautious
- Applying prevention to low-cost, easily reversible routine actions, which only adds friction
- Using a warning in place of a constraint or default that could remove the error condition entirely
- Making constraints so rigid that legitimate edge-case input is rejected
Tradeoff
Prevention reduces costly errors and frustration, but every constraint, confirmation, or check adds a step; overuse trains users to dismiss confirmations by habit, which undermines the protection.
Conditional rules · Editorial advice
Related entries
A modal confirmation before commitment is one checking-and-confirming mechanism; it is unnecessary for reversible routine actions.
Placing needed information next to the action reduces memory burden and therefore mistakes.
WCAG 3.3.4 lists reversible, checked, or confirmed as a Level AA requirement because people with disabilities are more likely to make errors or fail to notice them.
Sources and what they support
Heuristic #5: the best designs prevent problems from occurring, by eliminating error-prone conditions or checking for them and presenting a confirmation before the user commits; prioritize high-cost errors, avoid slips with constraints and good defaults, and avoid mistakes by reducing memory burdens, supporting undo, and warning appropriately.
Retrieved: 2026-09-15Slips occur when users intend one action but perform another, similar one; they can be prevented with helpful constraints, suggestions, good defaults, and forgiving formatting.
Retrieved: 2026-09-15Mistakes stem from an incorrect mental model; they can be prevented by gathering user data, following conventions, clear affordances, previewing results, reducing memory burdens, confirming before destructive actions, and supporting undo.
Retrieved: 2026-09-15WCAG 2.2 Level AA requirement: for pages that cause legal commitments or financial transactions, modify or delete user data, or submit test responses, at least one of reversible, checked with a chance to correct, or reviewable and confirmable before submission must hold.
Retrieved: 2026-09-15 · Archived 2026-09-16Definitions reference these sources. Digital specimens, selection advice, relationships, and recipes are editorial work and have not been validated through user research.
Type extensions and implementation notes
This entry has no interactive specimen yet; the illustration is an editorial sketch. Product use still requires verifying that constraints do not reject valid input, that confirmations appear only on costly actions, and that undo actually works.
{
"evidenceType": "A design interpretation of a usability heuristic and an accessibility standard",
"limit": "This entry does not measure how much each prevention tactic lowers error rates, nor prescribe a cost threshold at which confirmation becomes mandatory."
}Full Agent entry JSON
{
"id": "error-prevention",
"type": "principle",
"name": {
"zh": "错误预防",
"en": "Error Prevention"
},
"aliases": [
"Nielsen Heuristic #5",
"防错设计",
"Prevent Errors"
],
"granularity": "experience",
"intents": [
"confirm-action",
"prevent-error"
],
"tags": [
"heuristics",
"slips",
"errors",
"confirmation",
"constraints"
],
"definition": "Good error messages matter, but a better design stops the problem before it happens: it eliminates error-prone conditions, or checks for them and offers a confirmation before the user commits. Errors split into unconscious slips and mistakes rooted in a wrong mental model, and the two need different prevention tactics.",
"boundary": "Error prevention is about design before an error occurs. It is not error messages and recovery (Nielsen's ninth heuristic); inline validation is only one realization of it, not the principle itself; and it does not call for a confirmation on every action.",
"signature": [
"Input is constrained to valid values, or offered sensible defaults and suggestions",
"Costly or irreversible actions are checked, confirmed, or reversible before they take effect",
"The strength of prevention scales with the cost of the error rather than being applied uniformly"
],
"when": [
"An action causes costly consequences such as legal commitments, financial transactions, or deleting or modifying data",
"Input has a clearly defined valid range, such as dates, quantities, or formats",
"Users perform practiced, automatic actions where attention drifts and slips happen"
],
"when_not": [
"Applying prevention to low-cost, easily reversible routine actions, which only adds friction",
"Using a warning in place of a constraint or default that could remove the error condition entirely",
"Making constraints so rigid that legitimate edge-case input is rejected"
],
"tradeoff": "Prevention reduces costly errors and frustration, but every constraint, confirmation, or check adds a step; overuse trains users to dismiss confirmations by habit, which undermines the protection.",
"comparison": {
"focus": "Whether an error can be avoided before it happens",
"mechanism": "Eliminate error-prone conditions, or check and confirm before commitment",
"cost": "Extra steps, the upkeep of constraints, and judging the cost of each error"
},
"sources": [
{
"id": "nng-heuristics-error-prevention",
"title": "NN/g · 10 Usability Heuristics for User Interface Design",
"url": "https://www.nngroup.com/articles/ten-usability-heuristics/",
"claim": "Heuristic #5: the best designs prevent problems from occurring, by eliminating error-prone conditions or checking for them and presenting a confirmation before the user commits; prioritize high-cost errors, avoid slips with constraints and good defaults, and avoid mistakes by reducing memory burdens, supporting undo, and warning appropriately.",
"checkedAt": "2026-09-15",
"archive": {
"lookupUrl": "https://web.archive.org/web/20260915*/https://www.nngroup.com/articles/ten-usability-heuristics/",
"status": "available",
"checkedAt": "2026-09-15T18:21:57.626Z",
"jobId": "spn2-c214ca6ca65135f964d23731cb22d3701cb6d598",
"url": "https://web.archive.org/web/20260915182252/https://www.nngroup.com/articles/ten-usability-heuristics/",
"timestamp": "20260915182252"
}
},
{
"id": "nng-slips",
"title": "NN/g · Preventing User Errors: Avoiding Unconscious Slips",
"url": "https://www.nngroup.com/articles/slips/",
"claim": "Slips occur when users intend one action but perform another, similar one; they can be prevented with helpful constraints, suggestions, good defaults, and forgiving formatting.",
"checkedAt": "2026-09-15",
"archive": {
"lookupUrl": "https://web.archive.org/web/20260915*/https://www.nngroup.com/articles/slips/",
"status": "available",
"checkedAt": "2026-09-15T18:22:06.816Z",
"jobId": "spn2-4ad7af99a4084ca6c55fd0ba66df8e64db212872",
"url": "https://web.archive.org/web/20260915182230/https://www.nngroup.com/articles/slips/",
"timestamp": "20260915182230"
}
},
{
"id": "nng-mistakes",
"title": "NN/g · Preventing User Errors: Avoiding Conscious Mistakes",
"url": "https://www.nngroup.com/articles/user-mistakes/",
"claim": "Mistakes stem from an incorrect mental model; they can be prevented by gathering user data, following conventions, clear affordances, previewing results, reducing memory burdens, confirming before destructive actions, and supporting undo.",
"checkedAt": "2026-09-15",
"archive": {
"lookupUrl": "https://web.archive.org/web/20260915*/https://www.nngroup.com/articles/user-mistakes/",
"status": "available",
"checkedAt": "2026-09-15T18:22:42.431Z",
"jobId": "spn2-d1543a368ce11da2d64e4a1254edd78011915b98",
"url": "https://web.archive.org/web/20260915182344/https://www.nngroup.com/articles/user-mistakes/",
"timestamp": "20260915182344"
}
},
{
"id": "wcag22-sc334",
"title": "W3C · Understanding SC 3.3.4: Error Prevention (Legal, Financial, Data)",
"url": "https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html",
"claim": "WCAG 2.2 Level AA requirement: for pages that cause legal commitments or financial transactions, modify or delete user data, or submit test responses, at least one of reversible, checked with a chance to correct, or reviewable and confirmable before submission must hold.",
"checkedAt": "2026-09-15",
"archive": {
"lookupUrl": "https://web.archive.org/web/20260915*/https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html",
"status": "available",
"checkedAt": "2026-09-16T04:00:13.756Z",
"jobId": "spn2-a2bf6eb9a9eda64f0ecf111bca4833c22543ba4b",
"url": "https://web.archive.org/web/20260916040037/https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html",
"timestamp": "20260916040037"
}
}
],
"relations": [
{
"target": "modal-dialog",
"kind": "realized_by",
"condition": "The action is irreversible or costly and no undo can be offered",
"reason": "A modal confirmation before commitment is one checking-and-confirming mechanism; it is unnecessary for reversible routine actions.",
"basis": "editorial"
},
{
"target": "recognition",
"kind": "composes_with",
"condition": "Mistakes arise because users must remember formats, codes, or earlier information",
"reason": "Placing needed information next to the action reduces memory burden and therefore mistakes.",
"basis": "editorial"
},
{
"target": "inclusive-design",
"kind": "informs",
"condition": "A page involves legal, financial, or user-data submissions",
"reason": "WCAG 3.3.4 lists reversible, checked, or confirmed as a Level AA requirement because people with disabilities are more likely to make errors or fail to notice them.",
"basis": "editorial"
}
],
"rules": [
{
"when": "The action is irreversible or costly",
"instruction": "Provide at least one of reversal, checking before submission, or review and confirmation.",
"strength": "must",
"basis": "editorial"
},
{
"when": "Input has a clearly defined valid range or format",
"instruction": "Prefer constraints, defaults, and forgiving formatting that make slips impossible over warnings after the fact.",
"strength": "recommend",
"basis": "editorial"
},
{
"when": "The action is a low-cost, easily reversible routine step",
"instruction": "Do not show a confirmation dialog; frequent confirmations get dismissed by habit.",
"strength": "recommend",
"basis": "editorial"
}
],
"principle": {
"evidenceType": "A design interpretation of a usability heuristic and an accessibility standard",
"limit": "This entry does not measure how much each prevention tactic lowers error rates, nor prescribe a cost threshold at which confirmation becomes mandatory."
},
"demo": null,
"version": "0.1.0",
"editorialStatus": "drafted",
"requirements": [],
"demoCapabilities": [],
"implementationNote": "This entry has no interactive specimen yet; the illustration is an editorial sketch. Product use still requires verifying that constraints do not reject valid input, that confirmations appear only on costly actions, and that undo actually works.",
"image": {
"src": "/images/error-prevention.webp",
"alt": "A fictional form where the date field's picker allows only valid dates and a delete button sits beside a small confirmation that hints undo is available."
},
"searchTerms": [
"启发式",
"失误",
"错误",
"确认",
"约束"
]
}