About this set
Alerts that ask the reader to do something. The error summary sits at the top of a pottery workshop booking form, says how many problems there are and links each one to its field; the fields repeat the message in red and point to it with aria-describedby. A short script makes each link focus its field with the label in view and, after a failed submit, moves focus to the summary so it is read first. This is the pattern GOV.UK and most accessible form guides recommend. The two action alerts pair a message with buttons: a trial reminder with Upgrade plan and Remind me tomorrow, and an update prompt with Restart now and Later; the buttons wrap under the text on narrow screens. The list alerts show a publishing checklist with a progress bar and done or to-do items, and an import warning whose skipped rows open in a native details element, so the alert stays short until someone wants the detail. Use the summary on any form with more than two fields, the action alerts for time-limited prompts, and the list alerts when a result needs detail.
What’s included
- Error summary that links to each invalid field
- Fields marked with aria-invalid and aria-describedby
- Action alerts with primary and secondary buttons that wrap on mobile
- Checklist alert with a progress bar and hidden Done or To do prefixes
- Expandable skipped-rows list on native details, no script
Accessibility
The summary has role="alert" and tabindex="-1", so it is announced and can take focus after a failed submit, and each link moves focus straight into its field. Invalid fields carry aria-invalid="true" and aria-describedby pointing at their message. The progress bar is a named progressbar, checklist states are given in visually hidden text, every control has a visible focus outline, and transitions stop under prefers-reduced-motion.
Customise it
In plain CSS the action and list alerts read --xa-bg, --xa-line, --xa-ink, --xa-strong and --xa-accent from the .xa-indigo, .xa-neutral, .xa-success and .xa-warning classes; the summary colours are on .xa-summary. In Bootstrap the same colours are set through --bs-alert-* and --bs-btn-* variables; in Tailwind edit the hex utilities.






