Git Product home page Git Product logo

Comments (3)

bartaz avatar bartaz commented on June 11, 2024

We used to have this discussion before #2180 and it was not implemented because it was considered bad pattern (user needs to know to hover on something to check the tooltip), but more importantly browsers don't allow this. When element is disabled it doesn't trigger any events, including mouse events needed to know when to show/hide the tooltip.

So to implement this, we would need a fake disabled style, that would just look disabled, but not disable the input (from browser point of view). This will be fighting with a native browser behaviour.

Another approach would be to have some kind of wrapper around disabled element, so the tooltip will not be on the disabled element, but on parent. This may work, but will require additional markup (wrapping element) which may not be straighforward in context of some components.

from vanilla-framework.

danielmutis avatar danielmutis commented on June 11, 2024

WG: from a UX perspective we believe this is useful, in order to give users contextual info on why the item is disabled. These don't work on mobile, but in our context this is not very prominent.

Sources:
https://www.smashingmagazine.com/2021/08/frustrating-design-patterns-disabled-buttons/#making-disabled-buttons-more-inclusive
https://www.smashingmagazine.com/2021/08/frustrating-design-patterns-disabled-buttons/

The implementation of this needs to be investigated further.

from vanilla-framework.

bartaz avatar bartaz commented on June 11, 2024

Having a quick look with Max it seems that the browsers these days seems to be a bit more consistent about triggering mouse events on disabled elements, so it should make it more feasable for implementation. I still need to investigate it a bit further and prototype some Vanilla examples.

https://codepen.io/maximilian-blazek/pen/KKEgPqG

from vanilla-framework.

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.