Skip to content

Comments

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

Open
amareshsm wants to merge 1 commit intoknadh:masterfrom
amareshsm:add-reduced-motion
Open

Add: prefers-reduced-motion support for WCAG compliance#75
amareshsm wants to merge 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

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.

1 participant