Label with no associated control
Part of Documentation, UX & Accessibility, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
A <label> with no for attribute is not programmatically tied to an input unless it wraps one, so screen readers may not announce the field name and clicking the label may not focus the control. Add for that matches the input id. Heuristic: a label that wraps its input is fine and can be ignored.
Why it matters
A <label> with no for attribute is only tied to a field if it physically wraps the input. When it does not, screen readers may not announce the field name, and clicking the label does not focus the control, which makes the form harder to use for everyone. This is a heuristic, because a label that wraps its input is correct and does not need a for.
How to fix it
Give the input an id and point the label at it with a matching for, for example <label for="email">Email</label> next to <input id="email">. Alternatively, wrap the input inside the label element so the association is implicit. Make sure each id is unique on the page.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo