Foundations
Accessibility
ReactLoom targets WCAG 2.2 AA for the behaviour and presentation it controls. Automated checks are a floor, not a conformance claim.
How components are verified
| Check | Where |
|---|---|
| axe-core rules (names, roles, ARIA) | Unit tests for every component state |
| Contrast of every semantic colour pair, every built-in theme | Unit tests (checkThemeContrast) |
| axe in a real browser, including colour contrast | Playwright on example apps, light and dark, dialogs open |
| Real modality, focus management, keyboard | Playwright end-to-end tests |
| Visual states in light, dark and high contrast | Visual-regression screenshots of every story |
| Screen readers, keyboard-only, 400 % zoom, forced colours | Manual checklist before a component is marked stable |
Manual audits are pending. Every component passes the checks above in Chromium, Firefox and WebKit, but the screen-reader passes (NVDA or JAWS, and VoiceOver), 320 px and touch reviews have not been recorded yet. They follow a published script per component and do not hold back a Stable label; problems they find are fixed as bugs in patch releases. If something does not work with your assistive technology, please report it.
What you get by default
- Native elements first: buttons, inputs, radios, checkboxes and
<dialog>behave as users expect. - Visible 2 px focus rings meeting 3:1 contrast, shown for keyboard focus only.
- Labels, descriptions and errors wired with
for/idandaria-describedby. - Motion tokens drop to 0 ms under
prefers-reduced-motion; forced-colours mode is supported. - Development warnings when a control or dialog has no accessible name.
Locales and right-to-left
Numbers are formatted and parsed with Intl for the active locale, which defaults to the browser’s. Wrap your app (or part of it) in LocaleProvider to choose one; read it back with useLocale().
LocaleProviderdoes not set the writing direction — adddir="rtl"to<html>(or the subtree) as well. Components use logical CSS properties, so layout mirrors automatically.- Arrow keys in sliders, tabs and lists follow the visual direction in RTL.
- Directional icons you pass in (arrows, chevrons) are yours to mirror:
transform: scaleX(var(--pl-dir, 1))flips them wherever the nearestdirisrtl. Prefer this over:dir(rtl), which CSS minifiers rewrite into language selectors for older browser targets. - Translate built-in strings such as
incrementLabelandthumbLabels; they default to English.
What remains yours
- Meaningful labels and a coherent heading outline.
- Validation messages and moving focus to the first error on submit.
- Contrast of custom themes — test them with
checkThemeContrast().