Ensure every input, select, and textarea has an accessible name via a <label>, aria-label, or aria-labelledby.
<label htmlFor="email">Email</label>
<input id="email" type="email" name="email">
<label for="email">Email</label>
<input id="email" type="email" name="email"><input type="email" name="email">Framework differences: React/JSX/TSX uses htmlFor, while Vue/HTML uses for.
When: Input, select, or textarea lacks a matching <label> or ARIA name
Warning: Form control missing id or accessible label
Solution: Give the element an aria-label, aria-labelledby, or reference a <label for> to provide an accessible name
Accessibility: Unlabeled controls are announced as “edit” or “button” without context, making forms unusable for screen-reader users.
SEO: Search engines lose semantic context for form fields, reducing discoverability for interactive page elements.
Prevent orphaned form controls by enforcing explicit label associations, improving navigation and user confidence.
H44: Using <label> elements with for/id to associate text labels with form controls.G173: Providing an accessible name via aria-label or aria-labelledby when visible labels aren’t possible.The <label> element and ARIA naming provide the control’s accessible name, forming the root of the accessibility tree for form fields.