Form fields should have a visible label

A form field should have a visible label, not only a title attribute or an aria-describedby hint. This is a best practice, not a WCAG requirement, but those techniques are unreliable and invisible to many users.

Rule IDlabel-title-only
ImpactSerious
Success criterion Best practice, not a WCAG requirement
Readabler fix Needs a change in the website’s code

Example

Before
<input type="text" name="coupon" title="Discount code">
<button type="submit">Apply</button>

Sighted users see an unlabelled box; the title appears only on mouse hover.

After
<label for="coupon">Discount code</label>
<input type="text" id="coupon" name="coupon">
<button type="submit">Apply</button>

Everyone sees “Discount code”, and screen readers announce the same text.

Why it matters

The title attribute shows a tooltip only when a mouse pointer rests on the field. Keyboard users, touch screen users and people using screen magnifiers usually never see it. People with cognitive or memory impairments need a label that stays on screen while they type, not a hint that disappears.

Screen readers do read title, and some read aria-describedby, but support varies and the text is treated as a description rather than a name in some combinations. A visible <label> works everywhere, can be clicked to focus the field, and matches what speech recognition users will say to reach it.

How to fix it

Add a visible label. Connect it with for and id:

<label for="city">City</label>
<input type="text" id="city" name="city">

Or wrap the field:

<label>City <input type="text" name="city"></label>

Keep title only as extra help, if at all. Never rely on it as the name.

Hints belong in a description, next to a label. aria-describedby adds information but should not replace the label:

<label for="pwd">Password</label>
<input type="password" id="pwd" aria-describedby="pwd-hint">
<p id="pwd-hint">At least 12 characters</p>

The design has no room for a label, for example a search bar in a header. Use visible text near the field and point to it with aria-labelledby, or use a visually hidden label as a last resort and make the purpose obvious from context, such as a search icon on the submit button:

<label for="q" class="visually-hidden">Search products</label>
<input type="search" id="q" name="q">

Placeholder text does not replace a label either: it vanishes as soon as the user types.

Checklist

  1. Give each field a visible label element.
  2. Do not use title as the only label.
  3. Use aria-describedby for hints, not names.
  4. Do not rely on placeholder text as a label.

How the check works

The check looks at <input>, <select> and <textarea> elements that need a label. It fails when the field's only source of text is its title attribute or an aria-describedby reference, with no <label>, aria-label or aria-labelledby. It passes when a proper label is present. Confirm visually that the label is actually shown on screen.

Resources

Updated October 27, 2026