If part of core functionality

Description The content should be described with inner text or aria-label
Role Identifies itself as an image or figure
State May need to be disabled by prefers-reduced-motion settings

Respect reduced motion settings

Not all people enjoy animations. Some people suffer from vestibular disorders that cause severe motion sickness. Interfaces that use effects like parallax scrolling or large background animations can make people physically ill.

Most PCs and mobile devices now have "prefers-reduced-motion" settings which allow apps to disable motion settings that can cause harm.