Labels and Placeholder Examples

A label identifies the purpose of a field. A placeholder can show an example value while the field is empty.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a date input
  2. Test correction after entry

Trace a date input

A departure date field can keep its label visible and show a format hint such as year-month-day. When the user enters a date, the label still identifies that value. See format and parsing for why the expected spelling may need explanation.

Test correction after entry

If the example disappears while typing, check that a reader can still identify the field and its requirements. Associated accessible names preserve its identifying text.[1][2]

References

  1. W3C, Web Content Accessibility Guidelines 2.2 ↩
  2. W3C Web Accessibility Initiative, Forms Tutorial ↩