We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

placeholder-as-label

Web validation

Placeholder text must not be used as a substitute for a label or as the sole accessible name for an input field.

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.

HTML
<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.

HTML
<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.

HTML
<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.

HTML
<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

Failure techniques

ACT Rules

Try It Yourself

Visual check

  1. Look at the empty field and note the hint text shown inside it.
  2. Type a value into the field, or let the browser auto-fill it.
  3. 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

  1. Load the page and open a screen reader.
  2. Type a value into the field, or let the browser auto-fill it.
  3. 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

  1. Open your browser's dev tools and select the input element.
  2. Look for an associated <label for>, aria-label, or aria-labelledby.
  3. If none are present, check whether the only descriptive text is the placeholder attribute.

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

StandardSuccess CriterionReference
WCAG 2.24.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 5499.4.1.2 Name, Role, ValueSame as the WCAG text.
Section 5081194.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 Tester1.3.1-programmatic-label, 5.CThe 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).

Personas impacted by this issue