Skip to content
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

Closed
mpayson opened this issue Sep 14, 2022 · 21 comments
Closed

Tooltip does not work with disabled button #5318

mpayson opened this issue Sep 14, 2022 · 21 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. p - low Issue is non core or affecting less that 10% of people using the library

Comments

@mpayson
Copy link

mpayson commented Sep 14, 2022

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

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

  1. Open codepen
  2. Hover over button, notice tooltip does not display

If disabled prop is removed, it works

Reproduction Version

beta.93

Relevant Info

No response

Regression?

No response

@mpayson mpayson added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Sep 14, 2022
@driskull
Copy link
Member

driskull commented Sep 14, 2022

@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 <calcite-button> to <button>.

@mpayson
Copy link
Author

mpayson commented Sep 14, 2022

Ah that makes sense, thanks for clarifying!

@mpayson mpayson closed this as completed Sep 14, 2022
@driskull
Copy link
Member

@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.

@driskull driskull reopened this Sep 14, 2022
driskull added a commit that referenced this issue Sep 14, 2022
pointer events will fire on disabled elements.
driskull added a commit that referenced this issue Sep 16, 2022
refactor(tooltip): Use pointer events in favor of mouse events. (#5318)

pointer events will fire on disabled elements.
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels Sep 16, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@driskull driskull added 0 - new New issues that need assignment. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 16, 2022
@driskull
Copy link
Member

@benelan @jcfranco can we use this issue as an area for discussion on if we should remove the pointer-events:none on disabled calcite-button?

@benelan
Copy link
Member

benelan commented Sep 16, 2022

Sure, @macandcheese do you have any design thoughts?

@jcfranco jcfranco added the has workaround Issues have a workaround available in the meantime. label Sep 16, 2022
@jcfranco
Copy link
Member

@benelan FYI, there's some initial discussion in the related PR.

@benelan benelan removed their assignment Dec 8, 2022
@geospatialem
Copy link
Member

Added to the Stalled milestone to discuss and prioritize after January's release.

@geospatialem geospatialem removed their assignment Dec 21, 2022
@geospatialem geospatialem added this to the Stalled milestone Dec 21, 2022
@yannikmesserli
Copy link

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 pointer-event: none removal on any disabled Calcite components?

@geospatialem
Copy link
Member

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 pointer-event: none removal on any disabled Calcite components?

@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 label with a button referencing the tooltip provides context on the disabled component?

@ReneU
Copy link

ReneU commented Feb 2, 2023

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.

@geospatialem geospatialem added the design Issues that need design consultation prior to development. label Feb 14, 2023
@brittneytewks brittneytewks removed the needs triage Planning workflow - pending design/dev review. label Mar 22, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. design Issues that need design consultation prior to development. labels Mar 30, 2023
@geospatialem geospatialem added a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. ArcGIS Online Issues logged by ArcGIS Online team members. labels Apr 18, 2023
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Apr 20, 2023
jcfranco added a commit that referenced this issue Apr 21, 2023
…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.
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Apr 21, 2023
@github-actions github-actions bot assigned geospatialem and unassigned jcfranco Apr 21, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Apr 21, 2023
@geospatialem
Copy link
Member

Verified on master.

On mouseover a tooltip can be referenced:
image

Tabbing and AT skips over the button and tooltip 👍🏻

@Anastasiia-Boleiko
Copy link

Anastasiia-Boleiko commented Jul 11, 2023

Hi there,

@geospatialem Can you please clarify whether the tooltips for disabled components will be accessible for assistive technology (AT) in the future?

Use aria-disabled="true" instead of disabled (it allows adding a tooltip on hover and focus) and apply appropriate styles to have a look and feel of a disabled state. Please, see a codepan example.
A bit more info on that topic:
A11Y and UX considerations for disabling
More about aria-disabled
Making Disabled Buttons More Inclusive

aria-disabled will still focus the button and announce that it exists, but that it isn’t enabled yet; the same way you might perceive it visually.

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.

@geospatialem
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. ArcGIS Hub Issues logged by ArcGIS Hub team members. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests