Chapter 11 of 11Part 4 · Finish

Prefers reduced motion: animation for every reader

Respect readers who ask for less motion: what WCAG asks, how to read the setting in CSS and GSAP, and what to keep or remove.

9 minBy Zuzo StudioUpdated

10 min

In this chapter you will

  • explain who the reduced motion setting is for and what WCAG 2.2.2 and 2.3.3 require
  • read prefers-reduced-motion in CSS, in plain JavaScript and with gsap.matchMedia()
  • decide which effects to keep, replace with a fade or remove for reduced motion

Before you startThis builds on SVG line animation: make a path draw itself.

Check your understanding

3 questions

Q1Your stylesheet has the blanket reduced motion reset that sets every animation-duration to 0.01ms. Which effect will still move for a reader with the setting on?

Show the answer

A GSAP tween that slides the heading in GSAP animates with JavaScript, not CSS animations or transitions, so the CSS reset never touches it. It needs gsap.matchMedia() or a matchMedia check.

Q2A footer has a decorative wave that loops forever beside the page content. Which WCAG criterion applies, even for readers without reduced motion turned on?

Show the answer

2.2.2 Pause, Stop, Hide It starts automatically, lasts more than five seconds and sits alongside other content, so it needs a way to pause, stop or hide it, or it should stop on its own within five seconds.

Q3Under reduced motion, what should happen to a card that normally rises 40px and fades in as it scrolls into view?

Show the answer

Drop the rise and keep a short fade The fade still signals that the card has arrived, and nothing travels across the screen.

Key takeaways

  1. For people with vestibular disorders, scroll linked movement and parallax can cause dizziness, nausea and headaches.
  2. WCAG 2.2.2 (level A) needs a way to pause anything that moves automatically for more than five seconds, for every reader.
  3. Under prefers-reduced-motion: reduce, replace movement with short fades rather than removing content or leaving it hidden.
  4. A blanket CSS reset is a useful backstop, but it does not touch JavaScript animation, so GSAP needs gsap.matchMedia() or a matchMedia check.
  5. Keep colour, opacity and focus states; remove or fade translation, scale, rotation, parallax, pinning and smooth scrolling.
Last chapter You have reached the end of Motion for the web Mark this chapter complete, then look back over the syllabus for anything you skipped.

02FAQ

Questions on this chapter

Something else on your mind? Email the studio and a designer, not a salesperson, replies within a day.

What does prefers-reduced-motion do?

It is a CSS media feature that tells your page whether the reader has turned on the reduce motion setting on their device. It matches reduce when they have and no-preference when they have not, and you can read it in CSS or with window.matchMedia() in JavaScript.

Should reduced motion remove all animation?

No. Reduced motion means removing movement such as slides, zooms, parallax and scroll linked effects. Short fades, colour changes and focus states can stay, because they give feedback without moving anything across the screen.