Incorrect label-to-form element connections

6/10 Medium

Developers frequently fail to properly connect labels to form elements by using the name attribute instead of id. Labels must be connected to elements via ID (which is unique per element), not name (which clusters form elements together), leading to accessibility failures and poor UX.

Category
dx
Workaround
solid
Stage
build
Freshness
persistent
Scope
language
Recurring
Yes

Sources

Collection History

Query: “What are the most common pain points with HTML for developers in 2025?4/5/2026

It uses labels, which is a happy surprise, but fails to connect them to the right form elements. For a label to describe a form element, you need the element to connect to an ID, not a name. A name attribute is not unique, instead it clusters form elements together.

Created: 4/5/2026Updated: 4/5/2026