Placeholders in form fields
For all users to understand how to fill out a form, the labels should be connected to form control.
The placeholder represents a short hint (a word or short phrase) to inform the user on what to fill out a form field. A hint could be a sample value or a brief description of the expected format.
A screen reader announces first the label and then the placeholder.
Disadvantage of only using a placeholder
Only using a placeholder (without a connected label) has some disadvantages:
- the form field doesnt have a proper accessible name.
- the placeholder text may become unreadable when a user zooms in and the text becomes too large for the input field.
- the placeholder text disappears when the user starts typing in the form field or when the field is filled out with autocomplete.
For a longer hint or other advisory text, place the text close to the form field. In this case, use a description.
Basic HTML example for a placeholder
Search for a product:
<label for="search">Search for a product:</label>
<input type="search" id="search" name="s" placeholder="For example: apples">
Resources
WCAG Success Criteria for placeholders
- 1.3.1 Info and relationships (Level A).
- 2.4.6 Headings and labels (Level AA).
- 3.3.2 Labels or instructions (Level A).
- 4.1.2 Name, role, value (Level A).
Related pages in this documentation
- Accessible name in Standards and best practice, Frontend code.
- Controls with accessible names, roles, and states in the Theme guidelines for the WordPress accessibility-ready program.
- Labeled form fields in the Theme guidelines for the WordPress accessibility-ready program.
Other resources
- Placeholders by MDN.
- Guidelines for web forms (Dutch content) by the NL Design System.
- First published: October 10, 2025
- Last updated: August 04, 2026
- Edit article: Improve it on GitHub
Other pages in: Input and label
-
Accessible name
Give a form field an accessible name with a label
-
Label has text only
Use only plain text in a label. Avoid including interactive elements such as links, buttons or tooltips inside the label content.
-
Best label location
Place the label above the form field, like a text input, textarea or select.
Quick links and main topics
Quick links
Disclaimer: This documentation is intended to help the WordPress community understand and implement accessible practices. It is not a replacement for the official Web Content Accessibility Guidelines. Please read the full disclaimer.