Motion
While moving elements may enrich UX for some, they can be a burden or even outright dangerous to others; careful consideration needs to be taken when animating parts of a design.
Why moving parts on a website are an issue
Important to remember: it's not only moving elements, but also the movements related to scrolling – in particular when foreground and background are moving at different speeds:
The "Parallax effect" (the background of a website scrolling at a different speed than the rest of page) is one of these fads that suddenly gain traction amongst designers, just for looking cool – "it can be done, so let's do it" – but without looking at the science of both how it is perceived by users and whether it really is an improvement:
Over the last year or so, a design trend in the web and mobile world has been transition animations, parallax effects, and the like. For many users, this can cause vestibular issues; the symptom is usually vertigo, or a feeling of motion sickness.
Referring to an empirical study, the authors rightfully point out that just one "Pro" argument ("it may increase user engagement") is outweighed by five "Con" arguments.
There are obviously many more negative points for using parallax design as there are positive.
These effects should really be used only with utmost consideration and never without testing them with users; plus, as with any animated elements, it should be imperative to only apply them if users have not set a "reduce motion" setting in their browser (easily detected in CSS using the prefers-reduced-motion media query).
Motion design is UX design
Giving users control over motion on a website is not only a WCAG requirement, but part of respectful UX design:
The prefers-reduced-motion media query
In CSS, it is possible to detect if users have set a "no motion" preference and use a media query to deliver a tailored experience:
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
Examples in the wild
In addition to sniffing for a browser preference, a design could also empower users to turn of motion if they prefer on the fly: