Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Animations respect prefers-reduced-motion OS setting #4974

Open
melloware opened this issue Dec 16, 2023 · 3 comments
Open

Core: Animations respect prefers-reduced-motion OS setting #4974

melloware opened this issue Dec 16, 2023 · 3 comments
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add

Comments

@melloware
Copy link
Member

Using animations on the web in the most accessible way requires a little extra consideration:

In general, it's best to use animations on the web in a complementary way rather than the only way to note a state change in UI. Remember to update the text of actions and change elements' other visual aspects too!

And when it comes to an animation's timing and duration, avoid changing the state of something at a rate of three times per second or greater - which can trigger photosensitive epilepsy.

All included animations now support and leverage the prefers-reduced-motion CSS media feature (opens new window)to detect if a user has requested that the system minimize the amount of non-essential motion it uses.

When a prefers-reduced-motion is set to reduce, it indicates that the user prefers less motion, which may trigger discomfort for those with vestibular motion disorders on the page.

image

@mertsincan
Copy link
Member

Thanks @melloware, is there any PR for it? :)

@melloware
Copy link
Member Author

@mertsincan so i didn't take a deep dive into PrimeVue/React yet but a couple of things can be done with CSS Media Queries:

PrimeIcons: primefaces/primeicons#1065

PrimeFlex: primefaces/primeflex#198

Then we need to look in PrimeVue and see anywhere animations are triggered and disable them when reduced motion is on?

const isAnimationDisabled = useMatchMedia(`(prefers-reduced-motion: reduce)`);

@mertsincan
Copy link
Member

I set a milestone for it. We'll check before the milestone is released.

@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jan 29, 2024
@mertsincan mertsincan added this to the 3.51.0 milestone Jan 29, 2024
@tugcekucukoglu tugcekucukoglu modified the milestones: 3.51.0, 3.53.0 Apr 4, 2024
@tugcekucukoglu tugcekucukoglu removed this from the 3.53.0 milestone Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants