Focus first error
forms.errors.focus_first_error
On submit, move focus to the first field in error.
Description
On submit, move focus to the first field in error so keyboard and screen-reader users land where repair starts instead of hunting. The submit control should not keep focus after a failed attempt. Apply when handling submit validation with one or more failing fields. Fail focus that stays on Submit or elsewhere instead of the first error field.
When to use
Handling submit validation when one or more fields failed checks.
Not when
Inline blur validation that never involved a full-form submit.
Agent hint
On failed submit, move focus to the first invalid field, not Submit.
After a failed submit, focus is on the first field in error.
Focus stays on Submit or elsewhere, not the first error field.
Citations
Vercel Web Interface Guidelines — Forms
https://github.com/vercel-labs/web-interface-guidelines/blob/main/README.md#forms