Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Blocks
  2. Forms
  3. Accessibility

Forms

Accessibility

Overview
Form and Field from @prepared911/ui expose native form semantics. The feature supplies localized labels, error copy, and what happens after a successful submit.
What the components handle
  • Names. Field associates its label with the control.
  • Invalid state. An invalid field is marked so the error text is the description of the control.
  • Error summary. errorSummary is an alert before the fields and is included in the form's description.
  • Focus after a failed submit. The default errorFocus moves focus once to the first invalid control. It does not move focus again on later renders.
  • Pending. The form sets aria-busy and ignores another submit. The Save button shows loading through useFormPending(). It is not removed from the tab order by a pristine check.
  • Native validation. noValidate defaults to true so the browser tooltip does not compete with the feature's messages.
What you must provide
  • Localized labels, descriptions, errorSummary, and button labels. The blocks have no default English strings.
  • A submit handler that reports invalid state. Form does not read a schema.
  • Focus or navigation after a successful submit. The form does not close a dialog by itself unless you use FormDialog or FormLayoutDrawer and the submit result says to close.
  • Confirmation copy for a destructive submit. submitIntent only changes the button's intent.
Keyboard
Enter submits from a single-line field. A textarea keeps Enter for a new line. Escape and outside dismiss on FormDialog and FormLayoutDrawer are held while the form is pending, and a dirty form asks before it closes.
Previous
Forms / API and Development
Next
Crud Page / Usage
On this page
Overview
What the components handle
What you must provide
Keyboard