# Accessibility Standards

Accessibility is a core value of The Fluid Theme, not an afterthought. These rules are non-negotiable.

## HTML Requirements

- Every `<img>` has meaningful `alt` text (not "image" or empty unless decorative)
- Every form `<input>` has a linked `<label>` (via `for`/`id` or wrapping)
- Every icon-only button has `aria-label`
- Current nav items use `aria-current="page"`
- Use native elements: `<dialog>` not `<div role="dialog">`, `<details>` not custom JS accordions
- Form errors connected via `aria-describedby`
- Loading states use `aria-busy="true"` and `aria-live="polite"`

## Keyboard

- Every interactive element reachable via Tab
- Escape closes all overlays (modals, dropdowns, popovers)
- Arrow keys navigate within groups (tabs, radio buttons, dropdown items)
- Never remove `:focus-visible` outlines — restyle if needed, never delete
- A child theme in `@layer themes` outranks every rule in `base` and `components`, whatever the specificity. Core shows focus on every field, invalid or valid ones too (`[aria-invalid]`, `[data-invalid]`, `[data-valid]`, `:user-invalid`), with the `--color-focus` outline from `base.css`'s `:is(input, textarea, select):focus`; a child theme's state border or box-shadow does not touch it, but an `outline` it sets on those fields wins while they have focus and can remove the only indicator. Keep a visible change on focus (domain-landing's Swiss look reached review without one, 2026-10-27) and check it: `node scripts/focus-check.mjs dist/fluid.min.css child.css`.
- Skip link: `<a class="skip-link" href="#main">Skip to content</a>`, with no `sr-only` added. `.sr-only` is in `@layer utilities`, which outranks `.skip-link:focus` in `@layer base`, so a core without the fix for issue #81 keeps the link a clipped 1px box when a keyboard user reaches it; core now leaves a focused skip link out of `.sr-only`, but sites on an older copy still clip it. `focus-check.mjs` tabs to the skip link on every showcase site (domain-landing review, 2026-10-27).
- Native `<dialog>` focus trapping via `.showModal()` — never add manual trap

## Motion

- `prefers-reduced-motion: reduce` respected in every animated component
- `[data-preset="still"]` disables all transitions entirely
- Spinners use pulse animation in reduced motion mode
- Skeleton shimmer uses opacity fade in reduced motion mode

## Touch Targets

- Minimum 44x44px interactive areas (exceeds WCAG 2.2 AA minimum of 24x24px)
- 8px minimum spacing between adjacent targets
- Destructive buttons on mobile get extra size and spacing

## Color

- Never rely on color alone to convey information — always pair with icon, text, or pattern
- Minimum contrast: WCAG AA (4.5:1 for text, 3:1 for large text and UI components)
- Test in both light and dark mode
- Status colors have matching subtle backgrounds for sufficient contrast
