Tooltips within Shadow DOM components sometimes fail to open when focused #6893
Labels
4 - verified
Issues that have been tested, confirmed as mitigated, and are ready to close.
ArcGIS Hub
Issues logged by ArcGIS Hub team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
impact - p3 - not time sensitive
User set priority impact status of p3 - not time sensitive
Milestone
Actual Behavior
According to our accessibility standards, tooltips should appear when their trigger is hovered over OR when their trigger is focused via the keyboard. However, tooltips in a Shadow DOM environment do not always open when their trigger is focused via the keyboard. I spent a few days trying to figure out what conditions cause this and here is what I've found:
I made a codepen and recorded the behavior. I also showed that creating the same scenario with the Light DOM does not produce the same error:
Screen.Recording.2023-05-01.at.4.56.55.PM.mov
Expected Behavior
Focusing on the 2nd tooltip trigger within a Shadow Root should display the 2nd tooltip, just like it does in the Light DOM
Reproduction Sample
https://codepen.io/sonofflynn89-the-reactor/pen/poxWRLY
Reproduction Steps
No Shadow DOM
section, note that both tooltips appearWith Shadow DOM
section, note that both tooltips appearNo Shadow DOM
sectionNo Shadow DOM
section, note that both tooltips appearWith Shadow DOM
section, note that the tooltip appearsWith Shadow DOM
section. Note that the tooltip does not appearReproduction Version
v1.3.1
Relevant Info
No response
Regression?
No response
Priority impact
p3 - want for upcoming milestone
Impact
We are working on an incredibly complex, space-limited gallery component and were hoping to leverage icon buttons to help users toggle between different views. Since space is so limited, we opted to move the button descriptions into a popover.
However, the
calcite-popover
forces keyboard navigation users to click theesc
button after every time an icon button comes into focus, otherwise they are locked in and cannot navigate anywhere else. Not a great user experience.We hoped to leverage the auto close-on-tab capability of
calcite-tooltip
to solve this problem, only to find out that it won't work for Shadow DOM. We cannot change our complex component to usescoped
at this time.If this problem does not get resolved, we may be forced to remove the tooltips entirely and hope that users can intuit from the icons what the purpose of the buttons are.
Esri team
ArcGIS Hub
The text was updated successfully, but these errors were encountered: