Overview
Every form input must have a programmatic label — either a <label> element, aria-label, or aria-labelledby.
Forms are where conversions happen—sign-ups, checkouts, contact requests—so an unlabeled form is a direct loss of business and a top ADA-lawsuit target. Without a programmatic label, a screen reader announces an input as just “edit text,” giving no hint whether it wants an email, a password, or a phone number. Placeholder-only forms look fine to sighted users but are an invisible wall for assistive-technology users and people with cognitive disabilities.
The Problem
This pattern is inaccessible — avoid it.
The Fix
Use this accessible pattern instead.
Step-by-step
Add a <label> element with a for attribute matching the input's id.
Or use aria-label="Email address" on the input directly.
Do not use placeholder as the only label — it disappears when the user types.
Group related inputs with <fieldset> and <legend> (e.g., radio button groups).
Common Mistakes
Using placeholder text as the only label (it disappears on input and often fails contrast).
Adding a <label> but forgetting the for/id association.
Labeling a group of radios or checkboxes without <fieldset>/<legend>.
Hiding labels with display:none, which also hides them from screen readers.
How to Test for It
Click each field’s label—focus should move to the input, which proves the association.
Tab through the form with a screen reader and confirm each field announces its purpose.
Run an automated scan for inputs missing an accessible name.
Framework Notes
How to apply this fix in your stack.