form-control-programmatic-label-quality

Form controls should not rely on placeholder or title as the primary label

manualWCAG 4.1.2 (A)confidence: mediumseverity: moderaterobust

Flags form controls whose computed accessible name relies on placeholder or title as the primary labeling method. Prefer <label> or aria-labelledby.

Applies to. Applies to labelable native form controls exposed to assistive technologies:

  • input (excluding type=hidden|submit|reset|button|image)
  • select
  • textarea

role="presentation"/"none" are excluded only when not focusable.

Expectation. If a control has a programmatic name, it should not rely ONLY on:

  • placeholder (non-empty)
  • title (non-empty)

Prefer an associated <label> or aria-labelledby.

Examples

can't tell
<input type="text" placeholder="Email address">

The control's only name comes from `placeholder`, which disappears once the user starts typing.

n/a
<label for="email">Email address</label>
<input type="text" id="email" placeholder="name@example.com">

A persistent `<label>` provides the name; `placeholder` is just a format hint here.

View source