Skip to main content
All rules

A11Y-022

Label points at a field that does not exist

MediumDefault severity · Accessibility · Accessibility (WCAG 2.2 AA)

Last reviewed

What it checks

<label for="…"> values with no element of that id on the page.

Why it matters

The label is not connected to its field, so screen readers announce the field without a name and clicking the label does nothing.

Recommended fix

Set the label’s for attribute to the field’s id.

How to verify

Click each label and confirm its field gets focus.

Example fix prompt

Generic prompt (your report adds the evidence)
Please fix this production issue in my app.

Issue A11Y-022: Label points at a field that does not exist
Site: https://your-app.example

First confirm the issue in the code or live config. If it is not present, say so and change nothing.
Task: Fix the labels in the evidence so each for attribute matches the id of its input (generate both from the same useId() value in components).

Constraints: make the smallest change that fixes this, keep the current design and behaviour, never paste secret values into code or chat, and tell me which files you changed.
Done when: Click each label and confirm its field gets focus.

References