Do not design content in a way that is known to cause seizures or physical reactions.
WCAG 2.2, Guideline 2.3

What is it?
People with seizure disorders can be triggered by flashing, strobing, or rapidly moving content. Additionally, some users could have other physical reactions to some content like extreme headaches or dizziness. For others, it could simply be annoying or distracting.
Why does this matter?
You don’t want your content to cause physical harm to any of your users, nor do you want to distract from your message.
How do I check that my content is not going to trigger seizures or physical reactions?
If any of your content flashes, check to ensure it is within safe thresholds. Anything that flashes more than three times in one second is considered unsafe.
Allow users to disable any animations unless it is essential to the function or information.
Use a tool like the Photosensitive Epilepsy Analysis Tool (PEAT) to check your content.
Bottom line…
Keep your users safe. Do not use rapidly flashing movements.