You’ve finished Accessible Components Without a Framework. You can now build accessible disclosures, dialogs, popovers, form errors and navigation menus with native HTML and CSS, and assemble them into a themeable component kit from a brief, without a walkthrough.
Along the way, you built Kwame’s kit for the Ashgrove Tool Library, piece by piece:
- Form errors: On the Donate a Tool form, a summary at the top links to each field’s error.
- Disclosures: The borrowing FAQ became disclosures, and Late Returns opens one answer at a time.
- A modal dialog: The Cancel step ladder button opens a modal dialog.
- A popover: The help tip is an auto popover.
- An anchored menu: Each tool card’s Options menu sits under its own button.
- Navigation: On a small screen, the navigation folds behind a Menu disclosure.
- The kit: You rebuilt them as one kit, with tokens, a components layer and a dark theme.
Things to Remember
- Use native HTML, such as the
<details>and<dialog>elements and thepopoverattribute, before you add ARIA. - Pick a modal dialog when the page must wait, and a popover when people can carry on.
- Put errors in text and connect them to their fields, never in color alone.
- Give every Baseline Newly available feature a fallback.
- Check each component the way people use it: keyboard, screen reader, the automated tools, then the settings people choose.