After someone enters an email address on a service booking form, can they still tell what the field is for? If the only visible prompt was the placeholder, the answer may disappear as soon as they type. Give the field a persistent label and keep examples as hints.
Label the purpose and explain the format
Use a visible label for the field name. Match its for value to the input’s id. A placeholder can show an example while the input is empty. If people need an instruction after typing, put it next to the field and associate it with aria-describedby.
<label for="booking-email">Email address</label>
<input id="booking-email" type="email"
placeholder="name@example.com" aria-describedby="email-hint">
<p id="email-hint">We send the booking confirmation here.</p>
What Chrome exposed before and after typing
SEOWithJack tested three email fields in a local fixture. We checked the text shown in each field and its computed accessible name in Chrome before and after typing. We also clicked both visible labels to test their association.
| Field setup | Computed name, before → after | What stays visible after typing |
|---|---|---|
| Linked label plus example placeholder | Email address → Email address | The label and the separate hint. The example inside the field disappears. |
| “Email address” placeholder only | Email address → Email address | The typed value. No field label stays visible. |
| Visible label points to the wrong input ID | Empty → empty | The text stays visible, but clicking it doesn’t focus this field. |
Chrome used the placeholder string as a fallback name even after it disappeared visually. Only the correctly linked example kept a visible label and a native label association. This test read Chrome’s accessibility tree. Screen reader announcements need a separate check.
Repeat the check on your booking form
- Read the field when empty, filled and invalid. Keep the field name visible in all three states. Check the hint and any error text at mobile width.
- Click or tap the label. Verify that it focuses the intended input. If it doesn’t, compare the target ID and check that it is unique on the page.
- Inspect the computed name and description. In DevTools, check the input’s accessibility properties. The name should identify the field, and the description can answer a separate question. Compare with how to check an icon button’s computed name. If the form opens in a modal, test the keyboard focus around that modal too.
Frequently asked questions
What is a placeholder for?
It can show a short example or hint in an empty field. Use a persistent label for the purpose and separate text for instructions the reader needs later.
Why can I see a label while the computed name is empty?
The label may refer to the wrong ID, or the text may be a plain element without an association. Inspect which label the browser has linked to that input.
Is a description the same as a name?
The name identifies the control. The description provides additional context, such as where a booking confirmation will be sent.

