Skip to content

Forms

Status: drafted introduction, awaiting review

A form collects information: a sign-up, a checkout, a profile, a filter. Every field asks the person for something, and the words around it (the label, the help text, the required marks, and the message when an entry can’t be accepted) decide whether they can answer without guessing. These rules cover labels, required fields, and when to validate. Help text is in Tooltips and help text, and the wording of an error message is in Error messages.

Tier: neverux-visible-labelCheck: judgment

Every field has a visible label, and the placeholder is never the only label. A placeholder vanishes when typing starts, isn’t read reliably by screen readers, and usually fails contrast requirements. The label stays visible the whole time. Check it on the rendered form: a list of strings can’t show whether a label sits above the field or only inside it.

Instead of
Email address as gray placeholder text inside the field, with nothing above it.
Write
Email address as a label above the field, and the field left empty.

Tier: avoidux-form-labelsCheck: judgment

Write labels as nouns in sentence case with no colon, and mark required fields once per form. A label reads Company name, not “Company Name:” and not “Enter your company name.” Say “All fields are required” above the form, or mark the exceptions with “Optional,” whichever is fewer. An asterisk alone assumes the person knows the convention and can see it. Role-dependent: labels, where a pattern catches a colon, an asterisk, or a capital after the first word. Counting the required marks still takes a reader who sees the whole form.

Instead of
Email Address:*
Write
Email address, under a line above the form reading “All fields are required.”

Tier: avoidux-validate-after-leavingCheck: judgment

Validate a field after the person leaves it, and show the message next to the field. A message that appears at the first keystroke calls an email invalid before it’s been typed. The exception is a live constraint that helps, such as a character count.

Instead of
Invalid email under the field while the person is still typing the address.
Write
Enter an email address in the form name@example.com. under the field, once the person moves to the next one.