Accessibility
Components target WCAG 2.2 AA: full keyboard operation, visible focus, 48px touch targets, prefers-reduced-motion, RTL support, and screen-reader names required by the types where one is needed.
Commitments
- Keyboard operation and a visible focus indicator on every interactive element.
- 48px touch targets even for extra-small visuals — for example XS and S buttons wrap a 48px touch target while their layout height stays 32 / 40px.
prefers-reduced-motionremoves non-essential movement (see the Motion guide).- Right-to-left layouts via logical properties, so components mirror automatically.
- Accessible names required by the component types wherever one is needed.
Focus rings
Focus rings are a CSS outline with outline-offset (the focus-ring / focus-ring-inset utilities), so an overflow-hidden on the component itself can't clip them. The inset ring is drawn inside the element, for full-bleed items such as list rows, where an ancestor that clips its overflow would cut off an outer ring.
Names the types require
These components won’t type-check without an accessible name, so the requirement can’t be forgotten:
| Component | Required name |
|---|---|
IconButton, Fab, FabMenu | aria-label or aria-labelledby |
TextField | label, or aria-label / aria-labelledby |
Checkbox, Radio, Switch | a label (children), or aria-label / aria-labelledby |
RadioGroup | label, or aria-label / aria-labelledby |
Toolbars (Docked / Floating) | aria-label or aria-labelledby |
List, ChipSet, Carousel | aria-label or aria-labelledby |
Slider, RangeSlider | aria-label or aria-labelledby |
NavigationRail, NavigationBar | aria-label or aria-labelledby |
SearchBar | aria-label or aria-labelledby |
SearchField | aria-label or aria-labelledby |
BottomSheet | aria-label or aria-labelledby |
SideSheet | title, or aria-label / aria-labelledby |
Linear / Circular progress, LoadingIndicator | aria-label or aria-labelledby |
Keyboard behaviour
A per-family summary. Detailed per-component tables live on the individual component pages.
| Component | Keys |
|---|---|
Menu | Arrow keys move, typeahead jumps, Esc or an outside press dismisses, focus returns to the trigger. |
ButtonGroup (single select) | Renders a radiogroup; Tab enters and leaves the group as one stop, and arrow keys move between options. |
Tabs | Arrow keys plus Home / End move focus; Space or Enter selects the focused tab (keyboardActivation="automatic" selects on focus). |
Dialog | Focus is contained while open and returns to the trigger on close; Esc closes it and an outside press closes it too, except for an alertdialog (the default role); closedBy, as the HTML dialog's closedby, changes which of them may close it. |
Tooltip | Shows on hover or keyboard focus, stays while focused, and Esc hides it. |
Slider | Arrow keys adjust the value; Home / End jump to the ends. |
Right-to-left
Components use logical properties, so they mirror in RTL. React Aria, though, takes keyboard direction (arrow keys, start / end) from its locale rather than the DOM dir. DomDirectionLocale bridges that gap and is used internally by Toolbar, ButtonGroup, Slider, DatePicker, DateField and List. It lives in @windmorph/react/primitives, shown here for reference.
import { DomDirectionLocale, localeWithDirection } from '@windmorph/react/primitives';
// React Aria takes keyboard direction from its locale, not the DOM dir. DomDirectionLocale
// reads an element's computed direction and, when it differs from the locale, supplies a
// same-language locale with the matching script (en-US -> en-Arab-US for RTL, ar -> ar-Latn
// for LTR) that keeps its hour cycle and calendar (zh-Hant-TW -> zh-Arab-TW-u-hc-h12). Its
// digits are the new script's (ar-EG -> ar-Latn-EG), so React Aria inputs there read Latin
// ones. The components inside still write and read dates, times and numbers in the page's locale,
// which useLocale() gives your own formatting there.
<DomDirectionLocale>
{(directionRef) => <ul ref={directionRef}>{/* list items */}</ul>}
</DomDirectionLocale>;
// localeWithDirection('en-US', 'rtl') -> 'en-Arab-US'