Test your website →

Blog

Why Every Input Needs a Label (and How to Add Them Fast)

Placeholder text is not a label, and the fix takes about a minute per input.

The most common accessibility problem I see is also the cheapest to fix. It’s the unlabeled input. A text box sitting on a page with nothing attached to it except maybe some gray placeholder text that says “Email” and disappears the moment you click.

Designers like this pattern because it looks clean. And it does look clean, the way an unlabeled circuit breaker panel looks clean. The cleanliness is achieved by deleting information, and the information doesn’t stop being needed just because you deleted it.

Here is what a label actually does in HTML. When you write a <label> element and connect it to an input, either by wrapping the input inside it or by pointing the label’s for attribute at the input’s id, you create a relationship the browser understands. Screen readers announce the label when the user reaches the input, so a blind user hears “Email address, edit text” instead of just “edit text.” Clicking the label focuses the input, which matters more than people think, because it turns a tiny checkbox into a big click target. And browsers use labels to autofill forms correctly, which is the difference between a checkout that fills itself in and one the customer has to type by hand on a phone keyboard.

Placeholder text does none of this reliably. It vanishes when the user starts typing, which means the moment you most need to remember what a field is for is the moment the answer disappears. If you get interrupted halfway through a form and come back to it, a form labeled only with placeholders is a row of boxes with your own half-remembered guesses in them. Was that field asking for a username or an email? You can’t tell without deleting what you typed. Users with memory or attention difficulties hit this constantly, but so does everyone else; they just blame themselves instead of the form.

There’s a business argument here that I think is underrated because it’s boring. Forms are where money changes hands. Almost every website that makes money has a form standing between the visitor and the revenue: a checkout, a signup, a quote request, a booking. Anything that makes forms harder to complete is a tax on the exact moment a visitor was about to become a customer. Unlabeled inputs make forms harder for blind users, obviously, but also for autofill, for people on small screens, for people who are tired or distracted, which at any given moment is most people. When I run scans with GazeSite, missing labels show up on a remarkable fraction of otherwise well-built sites, and almost always on the forms closest to the money.

The fix is genuinely fast, which is why I find this problem a little maddening. For each input, you either wrap it: label around the text and the input together. Or you associate it: give the input an id, give the label a for with the same value. That’s it. If your design truly can’t show a visible label, and I’d push back on that, but sometimes there’s a search box where the magnifying glass icon is honestly enough, you can use aria-label on the input to give screen readers a name without rendering text. That’s the fallback, not the default. Visible labels beat invisible ones because sighted users benefit from them too.

While you’re in there, two small upgrades cost almost nothing. Set the right type on each input: type="email" brings up the email keyboard on phones, type="tel" brings up the number pad. And add autocomplete attributes like autocomplete="email" or autocomplete="postal-code", which tell browsers exactly which saved value to fill in. WCAG actually has a criterion about this, because for users with motor or cognitive disabilities, autofill isn’t a convenience, it’s the difference between finishing the form and abandoning it.

I want to say something about the compliance framing, because that’s usually how this topic gets sold: label your inputs or fail an audit. The framing is true but backwards. Audits exist because unlabeled inputs exclude real people, and excluded people don’t file complaints, mostly. They leave. They go to a competitor whose checkout their screen reader can read, or whose form their browser can autofill. You never see them in your analytics as anything but a bounce. The audit is the rare case where the problem becomes visible; the lost customer is the common case, and it’s silent.

So here’s the afternoon project. Open your site, go to every page with a form, and for each input ask one question: if the placeholder text vanished, would a stranger know what goes in this box? If not, add a label. On a typical small-business site there are maybe fifteen inputs total. You can label all of them in less time than it takes to sit through a meeting about whether to do it. Few fixes in web development have a better ratio of effort to people helped, and almost none have a better ratio of effort to revenue protected.

More articles

← All posts