Form
Bootstrap forms with client-side validation (Parsley.js), input masks (Inputmask), server-side errors and old input. Submit the demo empty to see the error summary.
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('signup')
->action('/signup')
->errorSummary()
->add(
Field::text('name')->required()->maxLength(80),
Field::email('email', 'E-mail')->required()->help('We never share your e-mail.'),
Field::tel('phone')->mask('(999) 999-9999')->help('Optional.'),
Field::password('password')->required()->minLength(8),
Field::select('country', ['fr' => 'France', 'ca' => 'Canada', 'cd' => 'DR Congo'])->placeholder('Choose...'),
Field::checkbox('terms', 'I accept the terms')->required(),
)
->submit('Create account');The form
| Method | Use |
|---|---|
action($url), method('POST') | PUT, PATCH and DELETE are sent as POST with a _method field (the Laravel and Symfony convention). |
csrf($token, $field = '_token') | A hidden CSRF field. |
add(Field ...$fields) | The fields, in order. |
errors([...]) | Server-side errors: field => message or field => [messages]; address.city matches address[city], and an error on one item of an array field (tags.1) shows under the field. |
values($_POST) | Old input after a failed submit (passwords are never refilled). |
errorSummary($enabled = true, $title = 'There is a problem') | Lists every error at the top with a link to each field, and moves focus to it after a failed submit. |
floatingLabels() | Bootstrap floating labels. |
submit($label) | The submit button's label; null renders none (e.g. a form whose button is in a modal footer). |
Client-side validation is a convenience: always validate again on the server and pass the messages to errors().
Layout
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
use Caelrik\Ui\Components\Form\Section;
return Form::make('signup')
->action('/signup')
->columns(2)
->add(
Field::text('first_name')->required(),
Field::text('last_name')->required(),
Field::email('email')->required()->columnSpan('full'),
Section::make('Address')
->description('Where we send your membership card.')
->columnSpan('full')
->columns(3)
->add(
Field::text('street')->columnSpan('full'),
Field::text('city')->columnSpan(2),
Field::text('zip', 'ZIP code'),
),
Section::fieldset('Contact preferences')
->columnSpan('full')
->add(
Field::checkboxes('channels', ['email' => 'E-mail', 'sms' => 'SMS', 'post' => 'Post'])->inline(),
),
Section::make('Company')
->description('Only if you sign up for a business.')
->collapsible(collapsed: true)
->columnSpan('full')
->columns(2)
->add(
Field::text('company'),
Field::text('vat', 'VAT number')->pattern('[A-Z]{2}[0-9A-Z]{2,12}'),
),
)
->submit('Sign up');| Method | Use |
|---|---|
columns($count, $breakpoint = 'md') | On the form or a section: 1, 2, 3, 4 or 6 columns from a Bootstrap breakpoint (sm to xxl) up, one column below it. |
columnSpan(2), columnSpan('full') | On a field or a section: how many columns it takes. |
Section::make($heading) | A card with a heading: h2, or h3 in another section. |
Section::fieldset($legend) | A fieldset whose legend names its fields for screen readers: for fields that belong together, such as an address. |
description($text) | A line under the heading or legend, read with it by screen readers. |
collapsible($collapsed = false) | A section the user can open and close (a native <details>). It opens by itself when a field inside it has an error, from the server or the browser. |
add(...) | Fields and other sections. |
Fields keep their order in the error summary and for screen readers: columns only change where they appear on wide screens.
Wizard
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
use Caelrik\Ui\Components\Form\Section;
return Form::make('onboarding')
->action('/onboarding')
->wizard()
->add(
Section::make('Account')
->description('How we contact you.')
->columns(2)
->add(
Field::text('name')->required(),
Field::email('email')->required(),
),
Section::make('Company')
->columns(2)
->add(
Field::text('company')->required(),
Field::select('size', ['1' => 'Just me', '10' => '2 to 10', '50' => '11 to 50'], 'Team size')
->placeholder('Choose...')
->required(),
),
Section::make('Confirm')->add(
Field::switch('newsletter', 'Send me product news'),
Field::checkbox('terms', 'I accept the terms')->required(),
),
)
->submit('Create my account');wizard() shows the form's sections one at a time, as steps, with a step indicator and Back and Next buttons:
- Next checks the current step's fields, with the error summary if the form has one, and moves to the next step only if they are valid. Enter in a field means Next, except on the last step.
- Back needs no check, and keeps what was typed.
- The submit button (
submit($label)) is on the last step. The whole form is sent at once, like any other form: validate it all again on the server. - After a failed submit, in the browser or from the server's
errors(), the form shows the first step with an error.
Each step is a Section::make() (not a fieldset, nor collapsible). Inside, use any field, columns() and nested sections; hidden fields can stay outside the steps. Translate the texts with wizard(next: 'Suivant', previous: 'Retour', progress: 'Progression', stepOf: 'Étape %d sur %d : ', completed: 'terminée').
On phones, the indicator names only the current step. The wizard needs JavaScript: without it, only the first step shows.
Repeater
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
use Caelrik\Ui\Components\Form\Repeater;
return Form::make('invoice')
->action('/invoices')
->add(
Field::text('customer')->required(),
Repeater::make('lines', 'Invoice lines')
->schema(
Field::text('description')->required()->columnSpan(2),
Field::number('quantity')->min(1)->value(1)->required(),
Field::number('price', 'Unit price')->min(0)->step(0.01)->required(),
)
->columns(4)
->min(1)
->max(10)
->reorderable()
->labels(add: 'Add a line', item: 'Line %d')
->help('Up to 10 lines.')
->value([
['description' => 'Design workshop', 'quantity' => 1, 'price' => 900],
['description' => 'Component library, per screen', 'quantity' => 12, 'price' => 150],
]),
)
->submit('Save invoice');A repeater is a group of fields the user repeats: order lines, addresses, contacts. Each row submits as name[key][field], here lines[0][description], lines[0][quantity].
| Method | Use |
|---|---|
Repeater::make($name, $label) | Added to a form or a section like a field. |
schema(Field ...$fields) | One row's fields, named relative to the row. Any field except files, rich text and hidden fields. |
columns(), and columnSpan() on the fields | The row's layout. columnSpan() on the repeater sets its width in the form. |
min($n), max($n) | Remove is disabled at min, Add at max. Check both on the server too. |
defaultItems($n) | How many empty rows a new form starts with (1; at least min). |
reorderable() | Move up and Move down buttons; rows submit in their order on screen. |
value([...]) | The rows to edit, e.g. a record's lines: a list of field => value arrays. |
labels(add:, remove:, up:, down:, item: 'Line %d'), help() | Texts; item names each row by its position. |
Keys are kept. Rows keep their key when others are removed or moved, and new rows count on from the largest key. After a failed submit, the old input, the errors (lines.3.quantity) and the error summary all find their row. The keys may skip numbers: use array_values($request->input('lines')) for a plain list. An error on the repeater itself (lines, e.g. "add at least one line") shows under it.
// Laravel
$request->validate([
'lines' => ['required', 'array', 'min:1', 'max:10'],
'lines.*.description' => ['required', 'string'],
'lines.*.quantity' => ['required', 'integer', 'min:1'],
]);Fields
Field::text('name')->required()->maxLength(80);
Field::email('email', 'E-mail')->required()->help('We never share your e-mail.');
Field::password('password_confirmation', 'Confirm password')->required()->equalTo('password');
Field::tel('phone')->mask('(999) 999-9999');
Field::number('age')->min(18)->max(120);
Field::select('country', ['fr' => 'France', 'ca' => 'Canada'])->placeholder('Choose...');
Field::checkbox('terms', 'I accept the terms')->required();
Field::textarea('message')->minLength(10);
Field::date('birthday');
Field::hidden('id', 42);Every kind of field:
| Builder | Renders | Section |
|---|---|---|
text, email, password, tel, number, textarea, hidden | Native inputs, with mask() for formatted input | Above |
date, time, datetime, dateRange | The browser's pickers; a range is two linked inputs | Dates, times and ranges |
select (with searchable(), multiple(), remote()) | A select, or a Tom Select combobox | Searchable and multiple selects |
tags | Free-text tags with suggestions | Tags |
otp | A one-time code, one input drawn as boxes | One-time codes |
keyValue | Rows of key-value pairs | Key-value lists |
signature | A pad to draw on, or a name to type | Signatures |
markdown | A textarea with a formatting toolbar and a preview | Markdown |
code | A code editor with syntax colors (CodeMirror 6) | Code |
radio, checkboxes, checkbox, switch, range, color, rating | Choice groups, toggles, sliders, color pickers, stars | Choices, switches, sliders, colors and ratings |
editor, file | Rich text (Quill), uploads (FilePond) | Rich text editor, File upload |
Dates, times and ranges
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('booking')
->action('/bookings')
->add(
Field::dateRange('stay')
->labels('Arrival', 'Departure')
->min('2026-01-01')
->required()
->help('The departure can be the arrival day.'),
Field::time('check_in', 'Check-in time')->min('14:00')->max('22:00')->step(900)->value('15:00'),
Field::dateRange('meeting', 'Meeting', 'datetime-local'),
)
->submit('Book');| Field | Submits |
|---|---|
Field::date($name) | 2026-11-05 |
Field::time($name) | 09:30 (with seconds if step() is under 60) |
Field::datetime($name) | 2026-11-05T09:30, without a time zone: convert it with the user's time zone on the server |
Field::dateRange($name, $label, $type = 'date') | name[start] and name[end]; $type is date, time or datetime-local |
They use the browser's own pickers: keyboard and screen reader support, the user's language and date format, and the native picker on phones, with no JavaScript library. min(), max() and step() limit the choices (step(900): every 15 minutes).
A date range is a fieldset with two inputs, labelled "From" and "To" unless you call labels($start, $end). The end must be on or after the start, and its picker starts at the start date. value() and old input take ['start' => …, 'end' => …], and a server error on stay, stay.start or stay.end shows under the range.
Searchable and multiple selects
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
$countries = [
'ar' => 'Argentina', 'au' => 'Australia', 'be' => 'Belgium', 'br' => 'Brazil', 'ca' => 'Canada',
'cd' => 'DR Congo', 'eg' => 'Egypt', 'fr' => 'France', 'de' => 'Germany', 'in' => 'India',
'jp' => 'Japan', 'ke' => 'Kenya', 'mx' => 'Mexico', 'ng' => 'Nigeria', 'za' => 'South Africa',
];
return Form::make('travel')
->action('/travel')
->add(
Field::select('country', $countries, 'Destination')
->searchable()
->placeholder('Type a country')
->required(),
Field::select('languages', ['en' => 'English', 'fr' => 'French', 'es' => 'Spanish', 'sw' => 'Swahili'])
->multiple()
->searchable()
->value(['en', 'fr'])
->help('Choose one or more.'),
Field::tags('interests', ['Food', 'History', 'Hiking', 'Museums', 'Beaches'])
->value(['Hiking', 'Street art'])
->maxTags(5)
->help('Type your own, then Enter or a comma, or pick a suggestion. Up to 5.'),
)
->submit('Save');| Option | Use |
|---|---|
searchable() | The user types to filter the choices (Tom Select). The original <select> still submits the value, so validation and old input work as usual. |
multiple() | Several choices: submits name[], and value() takes an array. Searchable, they show as tags with a remove button. |
remote($url, value: 'id', label: 'name', limit: 20) | Loads the choices from your endpoint as the user types: for long lists such as users or products. Makes the select searchable. |
A remote select asks GET $url?search=ada and expects {"data": [{"value": "…", "label": "…"}]}. Answer with respond() on the same field definition, which searches and sorts on the label field only, returns at most limit choices, and keeps only the value and label of each row:
$author = Field::select('author_id', [$post->author_id => $post->author->name])
->remote('/authors/options', value: 'id', label: 'name')
->value($post->author_id);
// GET /authors/options?search=ada (Laravel)
return response()->json($author->respond(new EloquentDataSource(User::query(), searchable: ['name']), $request->query()));The choices passed to select() are the initial ones: include the selected value, so its label shows before any search. Any data source works, and the endpoint must check the user's authorization like any other.
Tags
Field::tags($name, $suggestions) takes free text: the user types a tag and presses Enter or a comma, pastes php, laravel, or picks a suggestion. It submits name[] like a multiple select; value() and old input take a list of strings, and tags that are not suggestions are kept.
Field::tags('skills', ['PHP', 'Laravel', 'Vue'])
->value($user->skills) // ['PHP', 'Go']
->minTags(1) // also makes it required
->maxTags(5) // Tom Select stops adding at 5
->addText('Add "%s"'); // the line offering a new tag (default "Add %s")A tag that is already there in another case (php when PHP exists) is not added twice, and Enter never submits the form while a tag is being typed. remote() loads the suggestions from your endpoint, as for a select; use value: 'name' so the tag's text is submitted.
Tags are user input: check them on the server, e.g. 'skills' => ['array', 'max:5'], 'skills.*' => ['string', 'max:30'] (Laravel). An error on one tag (skills.1) shows under the field. Without JavaScript the field is a multiple select of the suggestions and current tags.
One-time codes
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('verify')
->action('/verify')
->add(
Field::otp('code', 'Verification code')
->required()
->help('Enter the 6 digits we sent to +243 •••• 12. You can paste them.'),
)
->submit('Verify');Field::otp($name) takes a code sent by SMS or e-mail, or shown by an authenticator app. It is one input, drawn as a box per character: phones and browsers offer the code they received (autocomplete="one-time-code"), pasting 123 456 or 123-456 fills every box, and screen readers announce a single text field. Without JavaScript it is a plain input as wide as the code.
| Option | Use |
|---|---|
codeLength(8) | 4 to 10 characters (6 by default). |
alphanumeric() | Letters and digits (K7M2QX), with the letter keyboard on phones, instead of digits only. |
message('…') | Replaces the default "Enter the 6-digit code." message, e.g. to translate it. |
The form is submitted with the button: a complete code is not sent on its own, so the user can check it first. Check the code on the server, and limit the attempts.
Signatures
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('contract')
->action('/contracts/42/sign')
->add(
Field::signature('signature', 'Your signature')
->required()
->help('It is stored with the contract.'),
)
->submit('Sign the contract');Field::signature($name) is a pad to sign on with a mouse, a finger or a pen, and a name input: typing a name draws it on the pad as handwriting. The name input is the way for keyboards and screen readers (drawing a signature depends on the path of the pointer, which no keyboard can give), and anyone can use it.
Either way the field submits a PNG image of 600 × 200 pixels, dark ink on a transparent background, as a data URL. Field::signatureImage() checks it and returns the PNG bytes, or null:
$png = Field::signatureImage($request->input('signature'));
if ($png !== null) {
Storage::put("signatures/{$contract->id}.png", $png);
}It returns null for anything that is not a PNG (whatever the data URL says) and for an image over 500 KB (signatureImage($value, $maxBytes) changes the limit). Without JavaScript the pad stays hidden and the typed name is submitted as text: keep it as the signature, or ask again.
| Option | Use |
|---|---|
required() | A drawing or a name is needed. The message is "Draw or type your signature."; message('…') replaces it. |
signatureLabels([...]) | Translates the texts: draw (the instructions), type (the name label), clear (the button), empty and signed (the name of the pad, which says whether it is signed). |
The pad looks like a sheet of paper, light with dark ink, in dark mode and in forced colors too. A form shown again with its errors keeps the signature. Signatures are not available in repeaters.
Markdown
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('post')
->action('/posts')
->add(
Field::text('title')->required(),
Field::markdown('body', 'Body')
->required()
->value("## What's new\n\nCaelrik now has a **Markdown** field:\n\n- a toolbar\n- a preview")
->help('Markdown: **bold**, _italic_, [links](https://example.com), lists and quotes.'),
)
->submit('Publish');Field::markdown($name) keeps the native textarea as the field, so screen readers, spelling, autofill and phone keyboards work as in any textarea, and adds:
- A formatting toolbar: bold, italic, heading, link, bulleted and numbered lists, quote and code. Each button styles the selection, or removes the style when it is already there; a list button changes the kind of a list. The toolbar is one tab stop, and the arrow keys, Home and End move between its buttons. Ctrl+B, Ctrl+I and Ctrl+K (⌘ on a Mac) work in the text. Formatting goes through the browser's own editing, so Undo undoes it.
- Write and Preview tabs (the WAI-ARIA tabs, with the arrow keys). The preview is the Markdown as HTML (GitHub-flavored, by marked), sanitized by DOMPurify: no scripts, no event handlers, no
javascript:links. A field with an error goes back to Write.
It submits the Markdown text. Render it on the server with a library that escapes HTML, never as it is:
use League\CommonMark\GithubFlavoredMarkdownConverter;
$html = (new GithubFlavoredMarkdownConverter([
'html_input' => 'escape',
'allow_unsafe_links' => false,
]))->convert($post->body);markdownLabels([...]) translates the texts: toolbar, bold, italic, heading, link, bulletList, numberedList, quote, code, write, preview and empty. marked and DOMPurify (87 KB) are loaded only by forms that have a Markdown field. Without JavaScript it is a plain textarea.
Code
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
$code = <<<'PHP'
<?php
// Greets someone by name.
function greet(string $name): string
{
return "Hello, {$name}!";
}
echo greet('Ada');
PHP;
return Form::make('snippet')
->action('/snippets')
->add(
Field::code('source', 'PHP source')->language('php')->value($code),
Field::code('settings', 'Settings')->language('json')->tabIndents()->value("{\n \"theme\": \"dark\"\n}"),
)
->submit('Save');Field::code($name) is a code editor (CodeMirror 6): line numbers, syntax colors, matching brackets, folding, search and replace (Ctrl+F), several cursors, and Undo. The textarea stays in the form, out of sight, and keeps the text, so validation, submit and reset work as with any field.
| Option | Use |
|---|---|
language('php') | The colors and indentation of javascript, typescript, jsx, php, html, css, json, sql, python, markdown or xml (text by default). Only that grammar is loaded. |
tabIndents() | Tab indents, as in a code editor. Escape, then Tab, leaves the editor. |
codeLabels([...]) | Translates keys and tabKeys, the text under the editor that says what Tab does. |
The keyboard: by default Tab moves to the next field, like in any form, so the editor is never a trap; Ctrl+] and Ctrl+[ indent and outdent, and the text under the editor says so (it describes the editor for screen readers). The editor's text is a multi-line text box named by the label, which takes the field's description, required state and error state; an error moves focus to it.
Colors follow the page in light and dark mode, and every syntax color keeps 4.5:1. CodeMirror (400 KB, and each grammar on its own) is loaded only by forms that have a code field. Without JavaScript it is a plain textarea.
Under a Content Security Policy, give Assets::tags() a nonce and allow it in style-src: CodeMirror injects its stylesheet as a <style> element, which takes the nonce from <meta name="csp-nonce"> (see Content Security Policy).
Key-value lists
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('webhook')
->action('/webhooks')
->add(
Field::text('url', 'Endpoint URL')->required(),
Field::keyValue('headers', 'Request headers')
->value(['Content-Type' => 'application/json'])
->keySuggestions(['Accept', 'Authorization', 'Content-Type', 'User-Agent'])
->keyValueLabels(key: 'Header', add: 'Add header')
->help('Sent with every call. A header is used once.'),
)
->submit('Save webhook');Field::keyValue($name) edits pairs such as metadata, HTTP headers or settings: a row per pair, a Remove button on each row and an Add button. A new form starts with one empty row.
Each row submits as name[n][key] and name[n][value]. Field::keyValues() turns them into a key => value array, and value() takes such an array (e.g. a JSON column):
// Laravel
$request->validate([
'headers' => ['array'],
'headers.*.key' => ['nullable', 'string', 'max:100', 'distinct', 'required_with:headers.*.value'],
'headers.*.value' => ['nullable', 'string', 'max:500'],
]);
$webhook->headers = Field::keyValues($request->input('headers')); // ['Accept' => 'application/json']keyValues() trims the keys, leaves out rows without a key, and keeps the last value of a key used twice. In the browser, a value needs a key and a key is used once: the message shows in the row. An error on one row (headers.1.key) shows under the list.
| Option | Use |
|---|---|
required() | At least one pair: the first row needs a key, and the list keeps one row. |
keySuggestions([...]) | Keys the key inputs suggest as the user types (a <datalist>); other keys are accepted. |
keyValueLabels(key:, value:, add:, remove:, missing:, duplicate:) | The column names, the buttons (remove takes the row's position: "Remove row %d") and the two messages, e.g. to translate them. |
Without JavaScript the rows shown can be edited, but Add and Remove need JavaScript. A key-value list also works in a repeater row.
Choices, switches, sliders, colors and ratings
<?php
use Caelrik\Ui\Components\Form;
use Caelrik\Ui\Components\Form\Field;
return Form::make('preferences')
->action('/preferences')
->add(
Field::radio('plan', ['free' => 'Free', 'team' => 'Team', 'business' => 'Business'])->required(),
Field::checkboxes('topics', ['news' => 'News', 'releases' => 'Releases', 'security' => 'Security'], 'Topics')
->inline()
->required()
->help('Choose at least one.'),
Field::switch('newsletter', 'Monthly newsletter')->value(true),
Field::range('volume', 'Notification volume')->min(0)->max(10)->value(6),
Field::color('accent', 'Accent color')->value('#0d6efd'),
Field::rating('experience', 'How was your experience?')->value(4),
)
->submit('Save preferences');| Field | Renders | Submits |
|---|---|---|
Field::radio($name, $choices) | Radio buttons in a <fieldset>, the label as its <legend>. required() requires a choice. | The chosen value. |
Field::checkboxes($name, $choices) | Checkboxes in a <fieldset>. required() requires at least one; value() takes an array. | name[]: the checked values, as an array. |
Field::switch($name) | A checkbox shown as a toggle, announced as a switch. | 1 when on, nothing when off. |
Field::range($name) | A slider; its value is shown after the label. min(), max() and step() default to 0, 100 and 1. | The number. |
Field::color($name) | A color picker. | A hex color, e.g. #0d6efd. |
Field::rating($name) | Stars: radio buttons named "1 of 5" to "5 of 5", in a <fieldset>. stars(10) for 3 to 10 stars. Not required, it has a "No rating" choice to clear it. | The number of stars, or an empty string for no rating. |
ratingLabels(star: '%d sur %d', clear: 'Aucune note') translates a rating's texts. Check a rating on the server like any number: 'experience' => ['nullable', 'integer', 'between:1,5'] (Laravel). The stars use --caelrik-rating-color: amber, or yellow in dark mode.
inline() puts the choices of a radio or checkbox group on one line. step() also works on number, date and time fields.
| Rule or option | Use |
|---|---|
required(), minLength(), maxLength(), min(), max() | HTML5 rules, also checked by Parsley. |
pattern('[A-Z]{2}[0-9]{4}') | A regular expression, anchored, without delimiters. |
equalTo('password') | Same value as another field. |
mask('99/99/9999') | An input mask. |
message('...') | A custom error message for every rule of the field. |
placeholder(), help(), value(), attribute($name, $value) | Placeholder, help text, value, any attribute. |
Accessibility
- Every field has a label; help and error texts are linked with
aria-describedby, and invalid fields getaria-invalid. - Radio and checkbox groups are fieldsets whose legend names the group; every input of an invalid group gets
aria-invalid. - A one-time code is a single text input named by its label; the boxes are drawn for sighted users and hidden from assistive technology. The box being filled shows the focus.
- A key-value list is a fieldset named by its label. Each input is named by its column and row ("Key 2", "Value 2"), and each Remove button by its row ("Remove row 2"), renumbered when rows are removed. An added row focuses its key; a removed row passes the focus to the row that takes its place, or to Add.
- A rating is a radio group: arrow keys change it, and each star is announced by its name ("4 of 5"). The focused star shows the focus ring, and each star is a 32 x 32 px target.
- A searchable select is a combobox labelled by the field's label, with its help and error texts; error summary links move focus to it. Its tags' remove buttons are 24 x 24 px.
- A tags field is the same combobox; the line offering a new tag is an option ("Add Rust"), announced like the suggestions.
- A failed submit focuses the first invalid field, or the error summary, which is announced once instead of one message per field.
- Required fields are marked with an asterisk hidden from screen readers, plus
required. - Sections are regions named by their heading, fieldsets are groups named by their legend, and a collapsible section's heading is a button that opens it with Enter or Space. Columns never change the reading or tab order.
- A repeater is a fieldset named by its label; each row is a fieldset named "Line 2", renumbered when rows move. Added rows take the focus; a removed row passes it to the row that takes its place, or to Add. The move buttons keep the focus as the row moves.
- A wizard's indicator is a list labelled "Progress" whose current step has
aria-current="step", and completed steps say so to screen readers. Moving to a step focuses its heading, read as "Step 2 of 3: Company".