-
Notifications
You must be signed in to change notification settings - Fork 77
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
Tooltip does not work with disabled button #5318
Comments
@mpayson For this, I think you would need to wrap the button in a div so that you can add the tooltip to that div instead. Disabled elements don't fire hover events so we can't really do anything here. Its the same if you change |
Ah that makes sense, thanks for clarifying! |
@mpayson actually, we may be able to do something here. I'll see if we can but for now wrapping it would be a good solution. |
pointer events will fire on disabled elements.
refactor(tooltip): Use pointer events in favor of mouse events. (#5318) pointer events will fire on disabled elements.
Installed and assigned for verification. |
Sure, @macandcheese do you have any design thoughts? |
@benelan FYI, there's some initial discussion in the related PR. |
Added to the |
Note that we encountered the exact same problem for Calcite Radio Group's items. When disabled, the tooltip explaining why it was disabled was not showing up. Should I open a new issue for it? Or is the discussion you are having (soon?) will include the |
@yannikmesserli We can definitely add this into the discussion. For now we'll purpose this issue for both discussions later this month and might add in a new issue once prioritization and next steps are determined. In the meantime, could the following example suffice for a workaround, where a |
We're running into the same issue in ArcGIS Velocity where we have many buttons that could be disabled and we want to display an explanatory text in a tooltip. The workaround works for us but makes things more complicated. |
…ng activation (#6732) **Related Issue:** #5318 ## Summary This tweaks the InteractiveComponent pattern to block all pointer/mouse on children (light/shadow) within host components, and to ignore clicks on the host to allow pointer events to be emitted while not activating on click. **Note**: in order to prevent focus moving to the host when clicked, the `pointerdown` event has to be canceled in the capture phase.
Installed and assigned for verification. |
Hi there, @geospatialem Can you please clarify whether the tooltips for disabled components will be accessible for assistive technology (AT) in the future?
As I mentioned earlier, it could be beneficial since some tooltips serve as relatively important information and might be helpful for those who use AT (not only for mouse users). Thanks. |
Hi @Anastasiia-Boleiko - thanks for reaching out, just getting back to messages from UC. We're meeting on this topic next week as a team as it could have some breaking change implications. Will report back our findings in the coming week or so, including next steps. |
Actual Behavior
Tooltip does not show up on hover when its target button is disabled
Expected Behavior
Tooltip shows up like the doc example
![Screen Shot 2022-09-14 at 11 52 25 AM](https://user-images.githubusercontent.com/5892789/190202900-54b9f3e8-f18e-4777-a4f1-973b104c2c6e.png)
Additional context from #6461
When a disabled button contains information available by tooltip, using only aria-disabled communicates the disable state while permitting keyboard focus to be moved to the button: https://codepen.io/FelFly/pen/gOdYQQq
Reproduction Sample
Reproduction Steps
If
disabled
prop is removed, it worksReproduction Version
beta.93
Relevant Info
No response
Regression?
No response
The text was updated successfully, but these errors were encountered: