Practice 1
Form errors
Compare a useful field error with one that is visible but disconnected from its input.
LESSON 15 OF 20
A form must explain what to enter, expose requirements before failure, and provide a clear recovery path when validation finds a problem.
Test labels, instructions, required state, validation timing, field errors, summaries, and counters as one task.
Each field needs a persistent, programmatically associated label. Required state, expected format, and essential constraints should be available before submission.
Feedback that appears too early can interrupt entry; feedback that appears too late can make recovery expensive. Choose timing that supports the task and announce only useful changes.
An error needs understandable text and a programmatic relationship with the invalid control. Focus and navigation should help the user find and correct it.
For larger forms, a summary can identify the problem set and link to each field. Field-level messages still need to remain available at the point of correction.
Accessible validation is a recovery system, not a collection of red borders.
Answer every question, then use the forward lesson button to record this lesson as complete. The check is not scored and can be repeated.