placeholder-as-label
Web validation
Placeholder text is a short hint shown inside an empty field. It disappears as soon as the user types or the browser auto-fills the field, so it cannot be relied on as the field's only label or accessible name. A visible, persistent label keeps the field's purpose clear at all times, even after a value is entered. Placeholder text is also often low contrast and can be mistaken for a value that is already filled in, which adds to the confusion.
Pass Patterns
Visible label associated with the input
The <label> provides a persistent name, and the placeholder is only a format hint.
<label for="email_address">Email address</label>
<input type="email" id="email_address" name="email_address" placeholder="name@example.com" />Visible text bound with aria-labelledby
The visible text above the field stays on screen at all times, and aria-labelledby uses it as the input's accessible name.
<span id="full_name_label">Full name</span>
<input type="text" name="full_name" aria-labelledby="full_name_label" placeholder="First and last name" />Fail Patterns
Placeholder used as the only label
The input has no <label>, aria-label, or aria-labelledby, so its only label is the placeholder, which disappears once a value is present.
<input type="email" name="email" placeholder="Primary email address" />A form of placeholder-only fields
Every field loses its label as soon as it is filled in or auto-filled, leaving the user unsure what each one was for.
<input type="text" name="full_name" placeholder="Full name" />
<input type="text" name="company" placeholder="Company" />
<input type="tel" name="phone" placeholder="Phone number" />WCAG techniques
Sufficient techniques
- ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used
- ARIA16: Using aria-labelledby to provide a name for user interface controls
- G108: Using markup features to expose the name and role, allow user-settable properties to be directly set, and provide notification of changes
- H44: Using label elements to associate text labels with form controls
Failure techniques
ACT Rules
Try It Yourself
Visual check
- Look at the empty field and note the hint text shown inside it.
- Type a value into the field, or let the browser auto-fill it.
- Check whether any text identifying the field is still visible.
Expected results: A visible label remains beside the field, so its purpose stays clear after a value is entered.
Actual results: The placeholder was the only label, so once the field has a value nothing on screen identifies what it is for.
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page and open a screen reader.
- Type a value into the field, or let the browser auto-fill it.
- Move focus away from the field, then back to it, and listen to what the screen reader announces.
Expected results: The screen reader announces the field's name, its role, and the entered value, for example “Email address, edit text, name@example.com”.
Actual results: The screen reader announces only the role and the entered value, or the name is missing or inconsistent, because it came from the placeholder.
Inspecting the browser dev-tools
- Open your browser's dev tools and select the input element.
- Look for an associated
<label for>,aria-label, oraria-labelledby. - If none are present, check whether the only descriptive text is the
placeholderattribute.
Expected results: The field's name comes from a <label>, aria-label, or aria-labelledby that stays in place regardless of the field's value.
Actual results: The field's only descriptive text is its placeholder attribute, which is not a reliable, persistent label.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
SC 4.1.2 requires every form control to have a programmatically determinable name. A placeholder can supply that name only as a fragile fallback: it is not designed for this purpose, support varies across assistive technologies, and it leaves no persistent visible label once the field is filled. Associating a real <label>, aria-label, or aria-labelledby gives the stable, reliably exposed name the criterion expects.
Why is this issue marked as Moderate?
Placeholder-only labels create a real barrier but usually do not block interaction outright. Users can still type into the fields, but they may lose track of each field's purpose after entering or auto-filling values. This affects screen reader users, people with cognitive disabilities, and anyone who relies on clear, persistent labels.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |
| Section 508 | 1194.22(n) | When electronic forms are designed to be completed on-line, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues. |
| 508 Trusted Tester | 1.3.1-programmatic-label, 5.C | The combination of the accessible name, accessible description, and other programmatic associations (e.g., table column and/or row associations) describes each input field and includes all relevant instructions and cues (textual and graphical). |