Make tooltips dismissable #15145
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Opening this issue to associate it to the pending PR #8147
As noted in #8033, in some edge cases the Gutenberg tooltips can overlay other buttons in the user interface. Also, according to the Web Content Accessibility Guidelines, tooltips need to be dismissable.
WCAG reference:
Success Criterion 1.4.13 Content on Hover or Focus
https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus
https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus.html
There are 3 items to address to meet the requirement:
#8033 made the tooltips persist but the "dismissable" part is missing. The guideline requires "a mechanism to dismiss the additional content without moving pointer hover or keyboard focus", and the suggestion is "by pressing Escape".
The correct behavior was visible, for example, on the previous Gmail interface (you can still revert Gmail to "Classic Gmail" for testing):
Not sure how to implement such a "global" Escape key behavior for all the tooltips in the UI.
For now, #8147 addresses just a first part by making use of
onMouseDown
:click
event on the tooltip to be passed to the button and trigger the associated actioncursor: default
style to the tooltipAnyone willing to continue work on #8147 is very welcome!
The text was updated successfully, but these errors were encountered: