Foundations

Accessibility

Target: WCAG 2.2 Level AA, in both themes, at every breakpoint. Where the kit already exceeds a requirement, the stricter value is the requirement.

What the kit guarantees

  • Contrast. All text clears 4.5:1 in both themes; interactive boundaries and state indicators clear 3:1. Run npm run audit to re-verify after any token change.
  • Colour is never alone. Status pairs hue with an icon and a label, validity pairs it with a message, and the current item pairs it with a fill or a marker.
  • Focus. The browser ring is removed globally and replaced globally — 2px of --lb-focus at 2px offset, concentric via border-radius: inherit, at :focus-visible only. Grouped controls draw one ring on the group.
  • Targets. A 44px floor everywhere, past the 24px WCAG 2.5.8 requirement. The 34px pill takes vertical margin so its spacing-inclusive target still clears 44px.
  • Keyboard. Every control is reachable and operable in DOM order, with no positive tabindex. Composite widgets follow the APG pattern documented on each component.
  • Motion. prefers-reduced-motion is honoured globally and every still state is the finished state, never a mid-transition frame.
  • Forced colours. Backgrounds and shadows are dropped and boundaries fall back to CanvasText.
  • Live regions. One polite region for the whole kit. role="alert" is reserved for errors a person must act on, and retries update the same node rather than stacking alerts.

WCAG 2.2 additions, explicitly

CriterionHow the kit satisfies it
2.4.11 Focus Not Obscuredscroll-margin-top at --lb-scroll-offset on every anchor target, so a sticky host header cannot cover a focused element.
2.4.13 Focus AppearanceA 2px indicator at 2px offset, ≥17:1 against every adjacent surface in both themes.
2.5.7 Dragging MovementsNothing requires a drag: the carousel has explicit previous and next controls, and the rating is arrow-key operable.
2.5.8 Target SizeA 44px floor at every breakpoint.
3.2.6 Consistent HelpContact and FAQ components keep their position across pages when placed by the page renderer.
3.3.7 Redundant EntryCapture forms preserve what was typed on a failed submit rather than clearing it.
3.3.8 Accessible AuthenticationNo field in the kit blocks paste or autofill.

What the kit needs from you

  • Write real alt text. The kit passes alt through untouched and defaults to "" only where an image is genuinely decorative.
  • Keep one h1. profile-header and hero emit an h1 by default; set headingLevel to 2 when the host page already has one.
  • Label icon-only controls. icon-link requires a label and warns without one.
  • Do not remove the focus ring. If you restyle it, replace it — --lb-focus is the single token to change.
  • Test the floor. A keyboard-only pass, a screen-reader pass, 200% zoom, 400% zoom reflow, both themes, reduced motion, forced colours, and axe-core with zero violations.
Navigation

Start here

Foundations

Components

See it

On this page