Skip to content

Accessibility

Shavin aims for WCAG 2.2 AA. Interactive components get their keyboard and screen-reader behaviour from Radix, colours are derived with contrast in mind, and automated tests run on every change. What you put inside the components (labels, alt text, heading order) is still yours to get right.

Keyboard and screen readers

These components are built on Radix primitives:

ComponentsHandled for you
Dialog, AlertDialogFocus trap, Escape to close, focus returns to the trigger, labelled title
Menu, ContextMenuArrow keys, type-ahead, submenus, Escape
SelectArrow keys, type-ahead, Home and End, selected state announced
Popover, HoverCard, TooltipPositioning that stays on screen, Escape, ARIA relationships
Tabs, AccordionRoving focus with arrow keys
Checkbox, RadioGroup, Switch, SliderNative-equivalent roles and keyboard support

Combobox is built on Popover with its own list behaviour. Simple controls (Button, Link, TextField) use native HTML elements.

An open Shavin Menu with three items, Edit, Duplicate and Delete, with Duplicate highlighted by the arrow keys.

A Menu opened from the keyboard. Arrow keys move the highlight; Escape closes it and returns focus to the trigger.

Focus

Controls show a 2px outline in the --focus colour when reached by keyboard. Rows inside menus and lists show focus with a background highlight instead, the convention for those patterns.

Colour and contrast

  • Brand text, link and focus colours are adjusted to about 4.6:1 against every page surface, in light and dark mode, for any brand you choose.
  • Text on brand fills uses white or near-black, whichever reads better.
  • Radio and switch states stay visible in Windows high-contrast mode (forced colours).

Motion

Animations respect prefers-reduced-motion. Background videos don't autoplay for people who reduce motion, and moving backgrounds have a pause button.

How it is tested

  • axe checks for WCAG 2.2 A and AA on the docs site in CI; serious and critical issues fail the build.
  • Browser tests for visible focus, the skip link, forced colours, reduced motion and reflow at 320px width.
  • Unit tests for component accessibility and token contrast.

Automated tests catch a part of accessibility problems, not all of them. Test key flows with a keyboard and a screen reader before you ship.

Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font