Skip to content

FRM-005 Mark required or optional fields one way, in the label, with any symbol explained

Level
Rule
Verdict
Unanimous (2 of 2)
Area
Forms
Status
decided, version 1.0.2

Rule

When a form marks required or optional fields, give every field of the same status the same marker, put it in the visible label or the group's legend as part of the accessible name, and explain a symbol in visible text no later than the first marked field.

Examples

Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.

Do: One marker, explained at the top

Request a call back

Fields with * must be filled in.

Every field that must be filled in has a star in its label, and the line above the first field says what the star means. Best time to call has none, so it can be left empty. No field shows an error until you press Request call.

Don't: Mixed markers, explained at the end

Request a call back

* required

Name has a star, Phone says “(required)” and Email has nothing, though it must be filled in too. The star is explained only under the button. Fill in name and phone and send: the error on Email is the first sign that it was needed.

Why

People decide how to spend their effort on a form by what each field asks of them. If one field says "*", the next says "(required)" and a third says nothing, they cannot tell which fields they may skip, and they guess. A marker in the label is seen with the field's name, before anything is typed and after, and a screen reader reads it with that name. A star means nothing until someone says what it means, while a word explains itself. The rule helps meet WCAG 2.2, 3.3.2 Labels or Instructions and 1.3.1 Info and Relationships. No WCAG criterion says which fields to mark or that a symbol needs a note.

Do

  • Put the marker right after the label text: "Email *" or "Phone (optional)". The marker is part of the label, so it is visible before, while and after the person fills in the field, as FRM-001 asks of the label itself.
  • Pick one marker for each status the form marks and use it on every field and group of that status. If Name reads "Name *", so does Email, and so does every other field that must be filled in.
  • Mark a group of radio buttons or checkboxes once, on its legend, such as "Delivery method *" over "Collect in store" and "Home delivery", not on each option.
  • Explain a symbol in plain text the person meets no later than the first marked field. A line above the form, "Fields with * must be filled in", works. So does hint text at the first marked field, such as "* means the field must be filled in" under "Name *".
  • Let a written marker such as "(optional)" or "(required)" stand on its own. A word needs no note.
  • Keep the marker inside the label or legend, so it is part of the accessible name and a screen reader reads it with the field's name. A required state in code, such as aria-required="true", is a good extra on top of that, never a stand-in for it. The Field component puts the written mark inside the label and sets aria-required when a field is required.
  • Give the marker text contrast and the label's normal look, or a quiet one that still meets 1.4.3 Contrast (Minimum). How to measure it is VIS-001.
  • Use the same marker across forms of the same kind in a product, so a person who learned it on one sign-up form can read the next.

Don't

  • Mix markers in one form: "Name *" next to "Email (required)", or a star on some required fields and nothing on others.
  • Put the marker only in the placeholder, as in an empty field reading "Required". It disappears at the first keystroke, and FRM-001 keeps essential information out of placeholders.
  • Show a field's status only by colour, such as a red label for required fields, or only by an icon with no text and no accessible name.
  • Rely on a note alone, such as a line above a booking form that names the fields to fill in while the fields themselves carry no marker. A note never replaces the marker at each field.
  • Use a symbol and explain it only at the end of the form, in a tooltip, or not at all.
  • Put the HTML required attribute on a field in a form that does not set novalidate. The browser then shows its own error bubbles on send and takes over the error timing in FRM-002b. If you use the attribute, set novalidate on the form, as FRM-007 asks for fields with built-in browser checks.
  • Hide the marker from screen readers, for example with aria-hidden on the star, even when the field also sets aria-required.
  • Make the marker look like an error. An untouched required field gets no error border, no error icon and no "Required field" message under it. ACT-005 and FRM-002b keep errors for later.
  • Draw the star in a pale grey that is hard to see against the background.

Exceptions

This rule does not decide which fields carry a marker: the required ones, the optional ones or both groups. The judges differ on that, and it is settled separately. Whichever choice a form makes, this rule covers how the marking works.

A form that marks no fields at all is outside this rule.

Verdict

Unanimous (2 of 2). Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work

Stances on FRM-005
SourceRoleStancePage
WCAG 2.2LawSupports3.3.2 Labels or Instructions
WCAG 2.2LawSupports1.3.1 Info and Relationships
WCAG 2.2LawSupports4.1.2 Name, Role, Value
WCAG 2.2LawSupports1.4.1 Use of Color
WCAG 2.2LawSupports1.4.3 Contrast (Minimum)
Material DesignJudge SupportsText fields: guidelines
Text fields: accessibility
Apple Human Interface GuidelinesJudge No position
Carbon Design SystemJudge SupportsForms
Text input: usage
GOV.UK Design SystemExpert witness SupportsQuestion pages
Recover from validation errors
Nielsen Norman GroupExpert witness SupportsMarking Required Fields in Forms, by Raluca Budiu

Each stance links to the page it rests on, read on the date in the source register. This page never repeats what a source says; read the source itself.

History

  • Version 1.0.2, : Points to VIS-001 for text contrast.
  • Version 1.0.1, : Examples in English.
  • Version 1.0.0, : First version.

Last checked against the other rules for conflicts on .

More in Forms: 15 rules and 12 guidelines · All rules