Skip to content

Accessibility, add support for prefers-reduced-motion #861

Description

@agch-dev

It would be a really good improvement if the library had more support for accessibility. One very important aspect when using animations is that not everyone wants to see them and for some it might have a negative impact.

One of the tools we can use to make this better is prefers-reduced-motion to bypass the transition all together.

Technically one can do this externally by getting that value with something like this hook use-reduced-motion and when it is true set the timeout to 0. But it would be much better if the library supported it by default and has a prop called ignorePrefersReducedMotion if people want to go out of their way to make it inaccessible.

I know this change would be breaking because it would change how the transitions work by default but it is very important for accessibility.

A more conservative approach would be to add the functionality turned off by default although less people would make use of it 😞.

In any case, adding some docs front and center about this feature should help educate people using the library and make products using this library more accessible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions