The `scrollTo` method isn't aware of reduced motion preferences, but smooth scrolling via `{ behavior: smooth }` is a kind of motion.

So before using that flag, you must first check `window.matchMedia("(prefers-reduced-motion)")` and use instant if it matches.

#a11y #accessibility #JavaScript

@siblingpastry That’s a quirk I’ve wished the JS to default to user preference (or to CSS authored preference) when the `behavior` option is not used.

Actually maybe the spec could have a new values for this option.

@meduz Yeah it would be better if the method itself handled this stuff.