Skip to main content
WCAGrules
Quick navigation

Do not ship form controls without accessible names

A field sits next to visible text with no code joining the two, so the name every sighted user reads never reaches assistive technology. F68 is the failure technique for it, which makes a match a defect on your form rather than a technique you can claim. Six things can supply that name. A label element tied to the field by its for attribute, a label wrapped around the field, aria-label, aria-labelledby, alt text on an image button, or a title attribute. Any one of them ends the failure. F68's own reach is narrower than most people assume, because it covers input, textarea and select and leaves submit buttons, reset buttons and plain buttons outside. A button with no name still breaks the rule. It just is not filed here.

How we find it in an audit

This one automates about as well as anything in the set. Every scanner we run lists the controls with no accessible name, and we confirm each hit in the browser's accessibility tree so the report describes what the API actually exposes rather than what the markup looks like. Then a reviewer goes after the quieter version, which is a name that exists and is wrong. A placeholder standing in for a label passes a scanner and disappears the moment somebody types.

How affected users experience it

Tabbing into the field, a screen-reader user hears edit text and nothing else. They guess from whatever came before, which is harmless on a newsletter signup and expensive on a payment form, where a wrong guess files a card number as a house number. Voice-control users are stuck harder still. Their command is click Email, and if no Email exists in the accessibility tree, there is nothing for the software to click.

Passes vs. fails

Passes: a label that stays put. Fails: placeholder-only fields.

Passes

<label for="email">Email</label>
<input type="text" id="email" name="email">

Fails

Email <input type="text" name="email">

How this gets tested

The W3C publishes test rules that define what a checker looks for here.

The other techniques filed under this rule

23 guides on this site are filed under 4.1.2 Name, Role, Value. W3C documents this one as a failure of that rule, so it describes a way the rule gets broken rather than a way to pass it.

This guide is our interpretation of W3C technique F68: Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations