-
Notifications
You must be signed in to change notification settings - Fork 80
refactor(tooltip): Use pointer events in favor of mouse events #5320
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
Conversation
pointer events will fire on disabled elements.
|
Definitely useful, especially if the tooltip can tell me why it's disabled. |
Hm, I'm not sure I would expect a disabled component to be interactive at all. I might expect another, not disabled UI element to invoke the tooltip. There are likely screenreader implications here to consider. |
Tested with NVDA and JAWS, and the disabled context isn't provided to them, which is the expectation with assistive technology. However, if implemented, this might be a case where we're providing content to some users, but not all. Not ideal to accommodate a larger audience. As Adam mentioned there could be another, non-disabled UI element that could invoke the tooltip for these use cases instead. |
The native button and native tooltip still work when the button is disabled. |
Ah, thanks for the context! If that's the native behavior, then makes sense to proceed. 👍🏻 |
I knew I had seen this somewhere! |
I still am not sure the tooltip should be invoked. Sometimes tooltips are just the name of button / action, but they are also used to contain descriptive or supplementary text, and only making that available via hover (and not focus, or click) seems weird. I think it’s valid to maintain the native functionality of showing a label on hover, but to me a label and tooltip are not totally the same. |
@macandcheese Agreed, but that sounds like that will be up to the developers since we wouldn't use title + BTW, I'm assuming you used label to mean native tooltip, but please correct me if you meant something else. |
I think this PR is good to go regardless as it just changes from mouse to pointer events. If we want to remove the |
Good point. Moving forward! WRT allowing tooltips on disabled components, let me know if y'all prefer an issue or discussion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐭👈
Related Issue: #5318
Summary
refactor(tooltip): Use pointer events in favor of mouse events. (#5318)
pointer events will fire on disabled elements.