Skip to content

ACT-005 Say next to an unavailable submit button what is still needed

Level
Rule
Verdict
Unanimous (2 of 2)
Status
decided, version 1.0.3

Rule

When a button that submits or continues a form is unavailable because required input is missing, show visible text directly before the button in reading order that says what the person must still do to make it work, and make that text readable without focusing the button. A required value that is filled in but not valid counts as missing.

Examples

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

Do: A neutral line right before the button

Join our newsletter

Enter your email and accept the terms to continue.

Subscribe is off, and the line just before it says why. Type an address and leave the field: the line becomes "Still needed: accept the terms." Try "anna@" instead, and the line asks you to check the address while the field shows its own error. With a good address and the box ticked, the line goes and Subscribe works. The form fits on one screen, so ACT-004 does not apply.

Don't: Greyed out with nothing near it

Join our newsletter

Subscribe is faded and nothing says why. Guess what is missing, then try "anna@": the field shows its error when you leave it, but nothing at the button tells you what is still needed.

Why

A faded button tells people that they cannot go on, but not why. It is also easy to miss. WCAG lets an inactive control fall below the contrast levels in 1.4.3 Contrast (Minimum) and 1.4.11 Non-text Contrast, and on the web a disabled button usually cannot take focus, so a keyboard or screen reader user may never reach it. Plain text beside the button closes that gap: it is ordinary text with normal contrast, it sits in the reading order, and it turns a dead end into a next step. No WCAG criterion asks for this text. It helps meet WCAG 2.2, 3.3.2 Labels or Instructions, and the off state itself must still be exposed in code under 4.1.2 Name, Role, Value, as VIS-008a says.

This rule does not say a submit button may be switched off. On a form that does not fit on one screen, as ACT-004 defines it, ACT-004 keeps the button enabled. This rule is the least a form owes the person once a team has switched the button off.

Do

  • A short form to join a newsletter has Email and a consent checkbox. While either is missing, a line just above Subscribe reads "Enter your email and accept the terms to continue."
  • Step 2 of 4 in a booking flow asks only for a time slot, and the whole step fits on one screen. Until a slot is picked, the text "Choose a time slot to continue" sits right before Next.
  • Name what is still missing when you can, and update the line as the person fills things in: "Still needed: phone number" after Name and Email are done. Remove the line once the button works.
  • Update the line when the person leaves a field or makes a choice, not on every key press, so it does not flicker or repeat itself to a screen reader.
  • Keep the text close to the button on screen as well as directly before it in the reading order, so a screen reader user hears it on the way to the button.
  • If the button stays focusable and is marked as unavailable in code, also tie the text to it as its description, for example with aria-describedby.
  • When the line changes, announce the change without moving focus, for example from a polite live region.
  • A switched-off submit button also stops Enter in the form's fields (FRM-015). The line tells a person who pressed Enter why nothing happened.
  • Keep the line neutral. "Enter your date of birth to continue" states what remains; it is not an error.
  • A required value that is filled in but not valid, such as a four-digit ZIP code, keeps the button off and the note at the button names it in neutral words: "Check the ZIP code to continue." The field's own error still waits until the person leaves the changed field, as FRM-002b says.

Don't

  • Grey out Continue with no text near it, so the person has to guess what is missing.
  • Put the reason only in a tooltip that appears when the button is hovered or focused. A disabled button often cannot be focused, and touch screens have no hover.
  • Place the explanation at the top of the page, far from the button and out of view.
  • Write the line in the button's faded colour, so it is as hard to read as the button.
  • Paint every empty field red or show "Required field" under fields the person has not touched yet. That is an error, and FRM-002b holds errors back until the person leaves a changed field or sends the form.
  • Read this rule as permission to switch off the submit button on a form that does not fit on one screen, as ACT-004 defines it. ACT-004 still applies.

Exceptions

  • While sending. After a valid press, the button may be unavailable to a new press while the form is sent, as the guideline STA-005b describes. The sign that it is working, which STA-005a asks for, is the explanation. Nothing is missing, so no note about what is needed is shown.
  • No permission. A control the person is never allowed to use is outside this rule.
  • Other reasons. A button that is off for a reason other than missing input, such as a closed booking window, 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 ACT-005
SourceRoleStancePage
WCAG 2.2LawSupports3.3.2 Labels or Instructions
WCAG 2.2LawSupports4.1.2 Name, Role, Value
WCAG 2.2LawSupports1.4.3 Contrast (Minimum)
WCAG 2.2LawSupports1.4.11 Non-text Contrast
WCAG 2.2LawSupports4.1.3 Status Messages
Material DesignJudge No position
Apple Human Interface GuidelinesJudge SupportsEntering data
Carbon Design SystemJudge SupportsDisabled states
GOV.UK Design SystemExpert witness No position
Nielsen Norman GroupExpert witness No position

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.3, : Points to VIS-008a for the off state in code and to FRM-015 for Enter.
  • Version 1.0.2, : The time while sending now refers to STA-005a and STA-005b.
  • Version 1.0.1, : Examples in English.
  • Version 1.0.0, : First version.

Last checked against the other rules for conflicts on .

More in Actions: 11 rules and 4 guidelines · All rules