Accessibility · Senior · Question 59 of 75

How do you respect reduced motion in JavaScript animations?

Show the answer

Correct answer: Check matchMedia and listen for changes to it

Explanation

CSS queries don't affect scripted animation, including smooth scrollTo and libraries, so you must check it yourself.

Further reading

Problem with a question

Accessibility · Senior · question 59

Test yourself

Take the Accessibility · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz