Lesson 25 of 30
Parallax, auto-playing animations, and big transform-based transitions aren't just a matter of taste for everyone — for users with vestibular disorders they can be genuinely painful or disorienting. prefers-reduced-motion is CSS respecting a real, explicit accessibility setting.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
Why does prefers-reduced-motion matter as a genuine accessibility feature, not just a nice-to-have?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
prefers-reduced-motion is a media feature that exposes an operating-system-level accessibility setting to CSS. A user with a vestibular disorder (a condition affecting balance and spatial orientation) can experience genuine nausea, dizziness, or disorientation from large-scale motion — parallax scrolling, auto-playing background animations, big transform-based transitions sliding whole sections of the page around. That's not a stylistic preference some users happen to dislike; it's a real physiological reaction, and the fix already exists at the OS level: the user goes into their system settings and explicitly turns on "reduce motion." Every website has access to that signal through this media feature. Ignoring it means actively overriding an accessibility choice the user already made on purpose.
The two values that matter: @media (prefers-reduced-motion: reduce) matches when the user has that setting turned on, and @media (prefers-reduced-motion: no-preference) matches when they haven't expressed a preference either way (which is the default for most users, who never had a reason to open that setting).
The pattern that actually matters here is which one you build around. Wrapping decorative motion inside no-preference — treating motion as something you opt into for users who haven't asked for less of it — means a media query that's missing, misspelled, or accidentally removed fails toward less motion, which is the safe direction. Wrapping the reduce case around every animation to strip it back out is the reverse: forgetting that override anywhere leaves full motion running for a user who explicitly said they don't want it, which is the failure mode that actually causes harm.
/* Base state: content is fully visible with no motion by default */
.hero-card {
opacity: 1;
transform: none;
}
/* Opt IN to motion, only for users with no stated preference */
@media (prefers-reduced-motion: no-preference) {
.hero-card {
animation: rise-in 400ms ease-out;
}
@keyframes rise-in {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
}
The base rule renders .hero-card fully visible, motionless, with no dependency on any media query matching at all. The animation only gets attached inside the no-preference block, so a user with reduced motion enabled simply never receives it, and a user with no OS-level opinion gets the full entrance animation. If this rule were deleted entirely tomorrow, the result is a static (but fully functional and visible) card, not a broken one — that's what "fails safe" means in practice.
no-preference) rather than an opt-out (reduce) override is the safer default, because a forgotten or mistyped media query then fails toward less motion instead of leaving full motion running for someone who explicitly asked to avoid it.prefers-color-scheme (light/dark) and prefers-contrast (higher-contrast rendering) follow the exact same shape — CSS reading an explicit, user-set OS-level accessibility or display preference and adjusting accordingly. Knowing one of these well transfers directly to the others."How would you add an entrance animation to a component without making it worse for users who need reduced motion?" is a real, common accessibility question — the strongest answers name prefers-reduced-motion unprompted, wrap the animation as an opt-in inside no-preference rather than bolting a reduce override on afterward, and can explain why that direction of default matters.