Giter VIP home page Giter VIP logo

Comments (3)

kostia1st avatar kostia1st commented on June 4, 2024

I checked the lib code, and found the issue.
It's usePrefersReducedMotion -> window.matchMedia('(prefers-reduced-motion: reduce)')

I don't think there's any mention of this behavior in the documentation - I guess it's worth mentioning, otherwise it appears to be a 100% bug for a developer, especially when it used to work normally before. For me that is a double surprise, because I don't have any motion disabled in the browser specifically. It just turned out that I had that "reduced animations" setting set on the OS level (and I don't remember why or when, heh).

Also, I don't think that such a lib should cater for (prefers-reduced-motion: reduce) at all - that's not kind of motion that requires being reduced to complete none. That is my opinion though, I might be wrong as I don't physically suffer from animations per se, just don't like the ones explicitly long and vivid. But in this case - the adequate (!) animation is the core reason this lib is used in the first place.

from collapsed.

roginfarrer avatar roginfarrer commented on June 4, 2024

One of the goals of this project is to be 100% accessible out of the box, not just providing the animation. In that case, the component is now working correctly--if the user enables the setting for preferring reduced motion, the collapse should observe that preference.

I think most browsers derive their own motion preferences from the OS preferences (I know this is the case for most browsers on MacOS). You might be able to override this for your browser in the browser settings.

I do see your perspective, though, and I did wonder about the necessity for adding it. Hopefully it works for you to manually override the setting in your implementation.

Thanks for the PR!

from collapsed.

kostia1st avatar kostia1st commented on June 4, 2024

@roginfarrer I've added #150 to complete the missing part.

from collapsed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.