# Placeholder as Label

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

Source: https://knowledge.evinced.com/web/web-validations/placeholder-as-label

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

-   [ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA14)
-   [ARIA16: Using aria-labelledby to provide a name for user interface controls](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA16)
-   [G108: Using markup features to expose the name and role, allow user-settable properties to be directly set, and provide notification of changes](https://www.w3.org/WAI/WCAG22/Techniques/general/G108)
-   [H44: Using label elements to associate text labels with form controls](https://www.w3.org/WAI/WCAG22/Techniques/html/H44)

### Failure techniques

-   [F68: Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name](https://www.w3.org/WAI/WCAG22/Techniques/failures/F68)

## ACT Rules

-   [Form field has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/)

## 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](https://knowledge.evinced.com/a11y-essentials/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](mailto: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

| Standard | Success Criterion | Reference |
| --- | --- | --- |
| WCAG 2.2 | [4.1.2 Name, Role, Value](https://www.w3.org/TR/WCAG22/#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](https://www.etsi.org/standards/etsi-301-549) | Same as the WCAG text. |
| Section 508 | [1194.22(n)](https://www.federalregister.gov/documents/2018/01/18/2018-00712/section-508-standards-update#d22) | 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](https://section508coordinators.github.io/TrustedTester/forms.html#check-131-programmatic-label) | 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). |

## Personas impacted by this issue

-   [Screen Reader](https://knowledge.evinced.com/a11y-essentials/personas#screen-reader)
-   [Voice Input](https://knowledge.evinced.com/a11y-essentials/personas#voice-input)
-   [Cognitive](https://knowledge.evinced.com/a11y-essentials/personas#cognitive)
-   [Low Vision](https://knowledge.evinced.com/a11y-essentials/personas#low-vision)

## Related Issues

-   [accessible-name](https://knowledge.evinced.com/web/web-validations/accessible-name)
-   [missing-contextual-labeling](https://knowledge.evinced.com/web/web-validations/missing-contextual-labeling)
-   [form-field-multiple-labels](https://knowledge.evinced.com/web/web-validations/form-field-multiple-labels)
