DocsCustomization
Accessibility
Accessibility is part of what a section is, not an add-on. These are the rules every Tapas section follows, and each section page lists its own notes.
What every section guarantees
- WCAG 2.2 AA
- Text contrast meets AA in light and dark with shadcn's default colors, because sections use theme tokens instead of fixed colors.
- Semantic HTML
- Lists are lists, quotes are figures, dates are <time>, and actions are real buttons and links. A button is never nested in a link.
- Headings you control
- Heroes render an h1 and take titleAs="h2" when a page already has one; other sections start at h2.
- Keyboard and screen readers
- Everything works with a keyboard, focus is visible, and decorative icons are hidden with aria-hidden.
- Works without JavaScript
- Forms, FAQ accordions and the pricing period switch are native elements (form, details, radio inputs).
- Reduced motion
- Motion versions render the plain layout when the visitor asks for less motion, and loops longer than five seconds have a pause button.
- Same text on server and client
- Numbers and dates use a fixed locale, so screen readers never hear a flash of different text after hydration.
How it is checked
Sections have Vitest and Testing Library tests for what a screen reader user depends on, and Storybook stories checked with the axe accessibility panel. Pull requests are checked in both themes and at phone width (about 390px) with no sideways scrolling.
Keeping it accessible after you edit
The code is yours once installed. If you change colors, recheck contrast for --muted-foreground on --background. Keep one h1 per page (pass titleAs="h2" to any extra hero), and give images real alt text unless they are decorative. Found a gap in a section? Report it.