Skip to content

Add: prefers-reduced-motion support for WCAG compliance#75

Merged
knadh merged 1 commit intoknadh:masterfrom
amareshsm:add-reduced-motion
Mar 21, 2026
Merged

Add: prefers-reduced-motion support for WCAG compliance#75
knadh merged 1 commit intoknadh:masterfrom
amareshsm:add-reduced-motion

Conversation

@amareshsm
Copy link
Contributor

Description

This addresses WCAG 2.1 Success Criterion 2.3.3 (Animation from Interactions)

Global wildcard - covers all current and future components in one block, avoiding per-component misses.
0.01ms durations - avoids breaking JS animation/transition events while effectively removing motion.
animation-iteration-count: 1 - stops infinite loops (spinners, skeletons) under reduced motion.
scroll-behavior: auto - disables smooth scrolling to prevent motion sickness.

All components with motion are covered automatically:
Animations: .spinner (continuous rotation), .skeleton (shimmer effect)
Transitions: dialog, [popover], .toast, button, form inputs, sidebar, accordion, tabs, tooltip, table rows

reference:
https://css-tricks.com/nuking-motion-with-prefers-reduced-motion
https://web.dev/articles/prefers-reduced-motion

@knadh knadh merged commit 445397d into knadh:master Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants