Sign-up form
Slant / Controls
A sign-up form built from Fields: name, email, a password you can reveal, a plan and the terms, each checked when you submit.
The theme follows the link: share a page with ?theme=moon.
Usage
- Each control sits in a
<Field>withField.Label,Field.DescriptionandField.Error; the field gives it an id,aria-describedby,aria-invalidandrequired, so the parts need no ids. - The form is
noValidate: Create account checks every field, turns the failing onesinvalidso their errors show, and moves focus to the first. After that the errors follow each edit. - The password is an
InputGroupwhose trailingToggleButtonshows or hides the text; the plan is aRadioGroup variant="card"with the price in eachaside; the terms are aCheckboxin a required Field.
Keyboard
| Tab | moves through the fields, the plan, the checkboxes and Create account |
| ← / → / ↑ / ↓ | moves the plan while a plan has focus |
| Space | toggles the focused checkbox or the password toggle |
| Enter | submits the form from a text field |
Accessibility
- Each error is linked to its control through
aria-describedbyonly while it shows, and the control isaria-invalid. - A status region counts the fields that need attention, then confirms the account; focus moves to the first problem, or to Start over.
- Required fields carry
required; the mark after a label is visual only.
Sign-up form in React and SwiftUI.
The React tab is the component’s real source; the SwiftUI tab is its twin in TUTTNKit.