Repository navigation
Web HIG tip #9: Respect reduced motion #20
frozonfreak
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
A slide-in panel looks smooth to most people. For someone with a vestibular disorder, it can bring on dizziness or nausea. Their OS already has a "Reduce motion" setting. Your CSS should listen to it.
Web HIG tip #9 (Quick #76 / HIG-A11Y-001): Respect
prefers-reduced-motion— replace motion with instant state changes or minimal opacity fade.Why it matters
Motion that's fine for one person can make another feel sick:
The full HIG (§1.3, Reduced Motion & Animation Safety) makes this a mandatory HIG requirement, even though the matching WCAG criterion (2.3.3 Animation from Interactions) is Level AAA. Auto-playing carousels and looping motion also need a pause control under WCAG 2.2.2 Pause, Stop, Hide (Level A).
The rule of thumb
Ask: with "Reduce motion" turned on, does anything still slide, zoom, spin, or scroll by itself?
If yes, swap that motion for an instant change or a short fade.
Motion started from JavaScript needs the same check:
Use
"instant", not"auto":"auto"follows your CSSscroll-behavior, so a site withhtml { scroll-behavior: smooth }would still glide.Reduced motion doesn't mean no feedback. A button can still change color and a dialog can still fade in. What goes is the movement: sliding, scaling, bouncing, parallax, and smooth scrolling.
Do this instead
prefers-reduced-motion: reducetransition: all(Quick #85, tip Add a primary hero CTA row on the docs homepage #6), so it's clear what your reduced-motion rules need to coverQuick check for your app
Turn on reduced motion: in Chrome DevTools, press Cmd/Ctrl+Shift+P, run "Show Rendering", and set "Emulate CSS media feature prefers-reduced-motion" to
reduce, or use your OS setting. Then open a menu and a dialog, trigger a page transition, and click an in-page link. Nothing should slide, zoom, or smooth-scroll, and every state change should still be visible. A media query existing isn't the same as the motion actually calming down, so test it.HIG.md §1.3 also includes a global CSS safety net that cuts animation and transition durations and turns off smooth scrolling under reduced motion. Treat it as a backstop, not a replacement for a calm version of each effect.
The Web HIG is a behavioral contract for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.
All reactions