# Can a reader match an error to its field?

Anonymous Analysts guide. Reviewed 2026-11-23.

![Blue jacket, View, Which item?. Blue jacket, View blue jacket, Choice is clear.](/assets/diagrams/forms-example.webp)

## What the result means

If a form rejects a value, the person filling it in needs to know which field to change. Check that the error message is connected to that field.

## What to do

Associate relevant help and error text with the field. Make validation messages explain the problem and preserve valid input.

## Practical example

A quantity field can reference a message explaining that the minimum quantity is ten.

## Implementation example

```html
<label for="quantity">Quantity</label>
<input id="quantity" name="quantity" aria-invalid="true" aria-describedby="quantity-error">
<p id="quantity-error">Enter a whole number of at least 10.</p>
```

## Adapting the example

This is an error-state example. Set and clear the state as validation changes, and test the actual announcement and recovery.

## How to verify the result

Submit an invalid test value, confirm the message is associated with that field and correct it using the stated instruction.

## What this check cannot prove

Static labels do not demonstrate keyboard operation, visual focus, announced validation or successful form submission.

## Where this advice comes from

The linked primary guidance informs these steps. Anonymous Analysts defines the test interpretation and its acceptance criteria.

## Sources and standards

- [www.w3.org](https://www.w3.org/TR/WCAG22/)

## Related checks

- [Can a reader tell what each field asks for?](/guides/checks/form-labels)
- [Where do links or buttons share a name?](/guides/checks/control-ambiguity)

[All check guides](/guides/) · [Run the free checker](/tools/agent-readiness#checker)
