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

Make tooltips dismissable #15145

Open
afercia opened this issue Apr 24, 2019 · 1 comment
Open

Make tooltips dismissable #15145

afercia opened this issue Apr 24, 2019 · 1 comment
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

Comments

@afercia
Copy link
Contributor

afercia commented Apr 24, 2019

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:

  • dismissable
  • hoverable
  • persistent

#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):

  • hover on a button, the tooltip appears and persists
  • don't move the mouse
  • press Escape: the tooltip disappears

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:

  • makes the tooltips dismissable when clicking on them
  • prevents the click event on the tooltip to be passed to the button and trigger the associated action
  • adds a cursor: default style to the tooltip

Anyone willing to continue work on #8147 is very welcome!

@afercia afercia added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Dev Ready for, and needs developer efforts labels Apr 24, 2019
@gziolo gziolo added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Apr 24, 2019
@afercia
Copy link
Contributor Author

afercia commented May 4, 2019

Note: this was also reported in the WPCampus/Tenon accessibility report, see #15344. Suggest: give higher priority.

@nicolad nicolad added [Status] In Progress Tracking issues with work in progress and removed Needs Dev Ready for, and needs developer efforts labels May 12, 2019
@nicolad nicolad assigned tellthemachines and unassigned nicolad Feb 8, 2021
@tellthemachines tellthemachines removed their assignment Feb 10, 2021
@skorasaurus skorasaurus removed the [Status] In Progress Tracking issues with work in progress label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants