What the person is doing
The field may be required, optional, readonly, disabled, or returned from the server with a validation error.
Foundation · lesson 2 of 34 · Input And Data Entry
Underlying principle: An input pattern carries a question, an expected answer, and a consequence. Visible labels, suitable controls, tolerant entry, and specific recovery keep that agreement clear.
Provide a labelled single-line input with stable hint and error association, width that matches expected answer length, normal typing and paste behavior, delayed validation, and preserved user-entered text.
An input pattern carries a question, an expected answer, and a consequence. Visible labels, suitable controls, tolerant entry, and specific recovery keep that agreement clear.
The field may be required, optional, readonly, disabled, or returned from the server with a validation error.
Provide a labelled single-line input with stable hint and error association, width that matches expected answer length, normal typing and paste behavior, delayed validation, and preserved user-entered text.
Empty untouched state with persistent label and optional hint.
Is the answer genuinely short and freeform, or is it a known choice, long answer, or specialized format?
Typing, deleting, selection, undo, and paste operate like a native single-line text field.
The field may be required, optional, readonly, disabled, or returned from the server with a validation error.
Open the working example, try its controls, and compare the behavior against the decision guidance.
The field may be required, optional, readonly, disabled, or returned from the server with a validation error.
Provide a labelled single-line input with stable hint and error association, width that matches expected answer length, normal typing and paste behavior, delayed validation, and preserved user-entered text.
Empty untouched state with persistent label and optional hint.
Placeholder-only label disappears during entry.
Associate every text input with a visible label or equivalent accessible name that matches the visible question.
GOV.UK Design System - checked
GOV.UK text input guidance supports persistent labels, hints, error messages, aria-describedby wiring, autocomplete attributes, and input width variants.
U.S. Web Design System - checked
USWDS guidance supports freeform text input use, delayed validation, field-width matching, paste support, placeholder cautions, and accessibility checks.
W3C Web Accessibility Initiative - checked
WAI-ARIA APG names and descriptions guidance supports accessible naming and avoiding placeholder-only naming for inputs.
Source trail checked: