Browse the docs
Accessibility
All Nook components target WCAG 2.1 level AA. This is a requirement for every component, not a bonus.
What we do
- Keyboard. Every interactive part works with the keyboard. Menus, tabs, radio groups and selects follow standard arrow-key patterns. Dialogs trap focus and give it back to the trigger when closed.
- Names and roles. Complex widgets are built on Base UI, which sets the right roles and ARIA states. Controls without visible text need an
aria-label, and the docs for each component say so. - Contrast. The theme generator measures every text pair against 4.5:1 and every control border and focus ring against 3:1, in light and dark. If a brand color fails, Nook adjusts it and tells you.
- Focus. Every control has a visible
focus-visiblering that uses theringtoken. - Meaning without color. The destructive menu item is underlined, alerts carry a title and text and not only a color, and invalid inputs expect a text message.
- Motion. Animations stop for people who ask for reduced motion.
- Targets. Controls are 40px tall by default. The smallest size is 32px, and 28px in compact density, above the 24px minimum of WCAG 2.2.
How we test
- Every component has an automated axe test for the WCAG 2.0 and 2.1 A and AA rules, including its open state for dialogs, menus and selects.
- Keyboard tests cover opening, moving, choosing and closing.
- Contrast is verified by tests over every preset and a set of extreme brand colors.
- A test fails the build if a component contains a hard-coded color.
Automated checks find only part of the problems. Please test your own pages with a keyboard and a screen reader, and report any issue you find.
What you still have to do
- Give inputs a label, and connect error messages with
aria-describedby. - Give icon-only buttons an
aria-label. - Write alt text for images.
- Keep the page's heading order logical.