Docs · Using components
Accessibility and reduced motion
Components respect reduced motion and several of the interactive ones can be used with a keyboard. Contrast and text are up to you.
On this page
Reduced motion
All 228 components take prefers-reduced-motion into account: when the visitor asks for less motion, they reduce or turn off the animation and show a final or still state. You don't have to write anything.
How to test it
- In Chrome: DevTools, the three-dot menu, More tools, Rendering, and under Emulate CSS media feature prefers-reduced-motion choose reduce.
- On macOS: System Settings, Accessibility, Display, Reduce motion. On Windows: Accessibility, Visual effects, turn Animation effects off.
Note
Reduced motion also covers what you put around them. If you animate other things on your page, respect the same preference with @media (prefers-reduced-motion: reduce).
Screen readers
Effects that change text letter by letter shouldn't be read out letter by letter. Decipher Text, for example, carries an invisible copy that always says the final text, and the animated version is hidden from screen readers.
Components that are real controls use the ARIA roles and attributes that fit them. Here are some:
| Component | What it covers |
|---|---|
| Spring Accordion | aria-expanded, regions and keyboard: arrow keys, Home and End. |
| Pill Nav | tablist with arrow keys, Home and End. |
| Gooey Tabs | Accessible tabs. |
| Elastic Slider | role="slider" with full keyboard support. |
| Slide to Confirm | Accessible as a slider. |
| Hold to Confirm | Works with mouse, touch or keyboard. |
| Toast Stack | They pause while you read them and are announced with aria-live. |
| Spring Tooltip | role="tooltip"; it also appears on keyboard focus. |
| Card Stack | Operated by click or keyboard. |
| Marquee | Keyboard focus pauses it. |
Mouse, touch and pen
Most interactive components use pointer events (pointer*), so they respond the same to mouse, touch and pen. They clean up their listeners, animations and observers on unmount, including when you navigate between pages in an app.
What's left for you
- Contrast. Text over an animated background must meet WCAG AA: 4.5 to 1 for regular text. Check it with the background at its lightest moment.
- Don't depend on the effect. Important information should be real text, not only an animation.
- Don't turn it off. Let
prefers-reduced-motiondo its job. - Visible focus. If you wrap an interactive component, keep the focus ring.
Spot a mistake or something missing? Email us at contacto@furin.dev.