Accessibility
Components target WCAG 2.2 AA and aim higher. The Storybook accessibility addon runs on every story, and the rules below are the checklist each component passes before it lands.
Colour and contrast
- The theme engine fits accent, status and tone text to 4.5:1, or 7:1 with
contrast: 'high', in both schemes. See Theming. - Colour is never the only cue. Unread dots, status dots, tone stripes and badges carry text or
sr-onlytext, such as "Unread" or "Failed to send", and counts get context: "4 unread", not "4".
Semantics and landmarks
- Semantic HTML first:
buttonfor actions,a hreffor navigation, lists asulorol, tables withth scopeand a caption,<time dateTime>for dates. - Screens have landmarks (
header,navwitharia-label,main,aside), oneh1and an ordered heading hierarchy. App shells and landing pages have a skip link to the main content (SkipLinkin the landing kit). - Images have
alt; decorative icons getaria-hidden.
Names, forms and live regions
- Icon-only controls require an accessible name:
labeloraria-labelis a required prop. - Every form control has a label. Descriptions and errors are linked with
aria-describedby, invalid fields setaria-invalid, and errors are announced throughrole="alert"or a polite live region. Required fields say so in text. TheFieldfamily in@peleda-app/uiwires these ids for you. - Asynchronous changes are announced: sync status, sending, copied, toasts and search result counts.
CopyButtonannounces "Copied" through a polite live region.
Keyboard and focus
- Composite widgets follow the WAI-ARIA Authoring Practices: listbox, grid, tabs, menu, tree and radio group with roving focus and arrow keys,
aria-selectedfor selection,aria-currentfor the current item andaria-expandedwitharia-controlsfor disclosures. Most are built on Radix primitives fromradix-ui. - Focus is always visible through
focusRing, a 3pxring-focusoutline from@peleda-app/ui. Focus is never trapped outside modals, returns to the trigger when an overlay closes, and no element has a positivetabindex. - Pointer targets are at least 24 by 24 pixels; small controls extend their hit area with
hitArea. - Actions with shortcuts expose them with
aria-keyshortcuts. Tooltips never hold information that is not available elsewhere.
Cursor
Base styles give cursor: pointer to buttons, links, summary, label[for], select and elements with interactive ARIA roles, and not-allowed to disabled ones. Anything clickable is a button, an a href or a Radix part, never a div with onClick.
Motion
Durations come from tokens and drop to 0ms under prefers-reduced-motion: reduce, under data-motion="reduced" and with the theme option motion: 'reduced'. MotionProvider sets reducedMotion="user" for motion/react. Only transform and opacity animate, and nothing flashes.
Reading
sans: 'atkinson','lexend'or'opendyslexic'switch the interface font, andreadability: 'relaxed'adds line height, letter spacing and word spacing.- Text never sits in a fixed-height box, so larger text sizes and taller scripts grow instead of clipping. See Fonts and scripts.