Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Write form errors that help people recover

    An error helps only when someone knows what failed and can resume without entering everything again.

    Go to the method

    Illustration of website project planning: Write form errors that help people recover

    Describe the expected correction

    Connect each message to its field and explain the required information. “Email address is incomplete” helps more than a technical code. Do not blame the user for a server outage or unavailable service.

    Explain rules before entry where possible: format, length, accepted files and optional information. The contact form guide helps reduce fields and clarify expectations.

    Validation timing is part of the message. An initially empty required field should not be announced as invalid before any submission attempt. While an address is being entered, a temporary value such as alex@ does not necessarily warrant an alert on every keystroke. Depending on the task, validate on leaving the field or after submission; immediate feedback can still help when checking availability remotely.

    aria-invalid indicates that a value failed validation; it neither defines the rules nor blocks submission itself. Connect that state to a message explaining the correction, then reassess it after correction. Do not present an accepted email format as proof of reachability. Pending verification and service failure need their own messages.

    • Field and problem identifiable.
    • Correction action explicit.
    • Constraints explained early.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Fictional exercise: choose when to announce an error
    Observed momentFeedback suited to this caseCheck to perform
    First opening, required field emptyLabel, required indication and helpNo premature aria-invalid="true"
    Address entry still in progressLet the person finish according to the chosen strategyAvoid repeated alerts for a temporary state
    Submission attempted with a rejected valueExplicit error associated with the fieldaria-invalid, accessible message and a way to correct

    Make feedback perceivable

    After submission, show a summary near the beginning and a message beside each affected field. Move focus predictably and connect each field to its error for assistive technology. Colour alone is insufficient.

    The W3C notification tutorial gives examples of local and overall feedback. Test keyboard, screen reader, zoom and narrow screens.

    Fictional example: a form contains name, email address and message fields. The name is missing and the address is incomplete; the message is already valid. The initial check must therefore report 2 errors, not 3. Correcting only the name leaves 1 error; correcting the address leaves none. At each step, compare the summary, local errors and retained values without requiring the message to be entered again.

    In this test contract, each summary link leads to the affected field; aria-describedby associates the explanation with its control and aria-invalid indicates the invalid state. Once corrected, remove the obsolete error association while keeping useful instructions. A service failure after validation is not another input error and does not prove that anything was saved. The table therefore distinguishes 0 field errors from a genuinely confirmed submission.

    • Summary and field messages.
    • Accessible error associations.
    • Focus and contrast tested.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Correcting two errors progressively: a fictional acceptance test
    Test stepRemaining field errorsExpected outcome
    Initial check2: name and email addressMessage retained; both errors accessible
    Only name corrected1: email addressName error removed; other error retained
    Address corrected too0Valid fields; saving still needs verification
    Service unavailable after validation0; separate service incidentNo false confirmation; recovery explained
    • W3C WAI : User Notification

      W3C WAI, consulted 22 October 2026: form notifications. The fields and steps form a fictional teaching example.

    Preserve input and intention

    Keep valid values after an error, except sensitive data that should not be displayed again. A long form should let someone resume in place. A rejected file needs a format or size explanation.

    Distinguish validation errors, network delays and duplicate submission. Repeated clicks should not create multiple requests or orders. Confirmation must say whether the action was actually recorded.

    • Valid fields retained.
    • Network failures handled clearly.
    • Duplicate submissions controlled.

    Test real cases

    Try empty fields, accented characters, mistyped email, oversized file, expired session and unavailable server. Ask someone unfamiliar with the form to recover without help and observe hesitation.

    After correction, check the email or next step, not just the on-screen message. Confirmation and error content also need review in every published language.

    • Representative errors covered.
    • Complete journey checked.
    • Messages translated and reviewed.

    Preserve input after an error

    Pen, blank form and calendar grid on a desk
    Correct one field without erasing information already entered.

    Proposed case: an invalid date clears other fields. The message identifies the issue but forces the person to restart the request.

    Trigger expected errors with fictional values. Check retention, message association and recovery; correction should not require guessing a hidden rule.

    • Trigger an expected error
    • Check retained data
    • Complete the corrected journey

    Separate a correction from a complete restart

    A rejected field should not unnecessarily erase valid answers elsewhere in the process. Test the actual server response, then revisit the previous step: preserving information only in the browser is insufficient if a server error returns an empty form.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Separate a correction from a complete restart
    SituationExpected resultCheck boundary
    Invalid fieldIdentify the field and explain the correction.Keep other valid, non-sensitive answers.
    Expired processExplain what can be resumed and what must be checked again.Do not expose previous input to another session.
    Back then forwardCorrect one value and review the updated summary.Confirm that old and new values are not mixed.
    • W3C WAI · WCAG 3.3.7

      Read the criterion’s scope and exceptions; this scenario is a practical interpretation, not a compliance certificate.

    Reference documents

    Content updated on

    Documented reference points for this topic

    Documented reference points for this topic
    ReferenceValue or syntaxScope
    WCAG 2.2 · 1.4.10
    320 CSS pxVertical content without two-dimensional scrolling; exceptions cover inherently two-dimensional content.
    WCAG 2.2 · 2.5.8
    24 × 24 CSS pxA smaller target can satisfy the criterion through spacing; other exceptions apply.
    WCAG 2.2 · 3.3.7
    A · same processWithin one process, previously supplied information must be auto-populated or available to select, subject to the criterion’s exceptions. Browser autocomplete alone is insufficient; the site must offer the information already received or avoid requesting it again.

    Dates indicate when references were consulted. These facts are neither a site audit nor an overall compliance statement.

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Two fields are invalid after submission.Each error is associated with its field and the summary helps locate them.Two invalid values, summary links, field associations and retained inputs.
    One error disappears after only one field is corrected.Other errors remain indicated and the corrected input is preserved.Values before and after and the remaining active errors.

    Frequently asked questions

    How do you check that an error message actually supports correction?

    Trigger an expected error, locate the field with a keyboard and follow only the displayed instruction. The message should identify the problem and possible correction, relate to the field and work without colour. Preserve other valid input, and avoid presenting a service failure as the user’s mistake.

    What should a message say when submission fails but the fields are valid?

    Distinguish invalid input from an unavailable service or an outcome still unknown after interruption. Do not ask users to correct an accepted field. Keep useful values and explain the recovery process. If the server may have saved the request before disconnection, check its outcome under the service contract before presenting resubmission as having no additional effect.