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

Block controls: Show tooltip on hover, keyboard focus #531

Closed
aduth opened this issue Apr 27, 2017 · 10 comments
Closed

Block controls: Show tooltip on hover, keyboard focus #531

aduth opened this issue Apr 27, 2017 · 10 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later

Comments

@aduth
Copy link
Member

aduth commented Apr 27, 2017

Block controls have a title property associated with them (example). Currently this is only assigned as the aria-label of the rendered IconButton component. This isn't exposed when hovering the button, so it's hard to know what action is associated with a particular block control.

  • Should we show the title as a tooltip?
  • How does it look?
  • On what actions should it appear? Hover, focus?
@aduth aduth added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Blocks Overall functionality of blocks labels Apr 27, 2017
@ellatrix
Copy link
Member

If it's essential information, it should probably not be shown on hover, and if it isn't, should it be shown at all? (I know this is different in the current editor)

@mtias mtias added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Apr 28, 2017
@jasmussen
Copy link
Contributor

For some of the buttons, like the Action Buttons, I think it'd be nice with an immediate tooltip, like this:

screen shot 2017-04-28 at 18 32 11

For the majority of buttons, like Bold/Italic, etc. — it's probably fine with a title attribute and the stock browser tooltip.

@afercia
Copy link
Contributor

afercia commented Apr 29, 2017

On what actions should it appear? Hover, focus?

I'd say on both, with the caveat that when a control gets clicked or activated with the keyboard, is stays "focused", unless focus is moved somewhere else. So there should be a way to hide the tooltip after the control activation.

Worth noting visual tooltips can be built in an accessible way and using just CSS, using the content property and targeting the aria-label attribute. See for example what GitHub does in this same page (see for example Notifications, Create new, and profile on the top right of this page).

@aduth
Copy link
Member Author

aduth commented May 1, 2017

Thanks for pointing to the GitHub example @afercia , I think we could make something like this work for our case. Based on the styles, it appears they're capturing the :hover, :active, and :focus pseudo classes. I'll plan to experiment with these in the editor.

@afercia
Copy link
Contributor

afercia commented Jul 12, 2017

Worth noting that tooltips were also mentioned in the initial accessibility recommendations, see point 8 in #297

Furthermore, they were often mentioned in various "Testing feedback" reported by @karmatosed, see #1546, #1547, #1549, and #1550.

@afercia
Copy link
Contributor

afercia commented Jul 12, 2017

Description of the ARIA tooltip pattern, still in development:
https://www.w3.org/TR/wai-aria-practices-1.1/#tooltip

@afercia
Copy link
Contributor

afercia commented Jul 26, 2017

Worth noting that also the block toolbars don't have any tooltip at the moment. Not even the "Classic Text" one, that uses the native TinyMCE controls:

screen shot 2017-07-25 at 20 22 06

While the same controls in the old editor do have tooltips:

screen shot 2017-07-25 at 20 21 43

Right now, they're also used to inform users about the associated keyboard shortcuts. That seems something valuable to me.

@paaljoachim
Copy link
Contributor

It would also be good to add tooltips to the image toolbar so the user can understand what each icon does before clicking it.

@aduth
Copy link
Member Author

aduth commented Aug 4, 2017

See also in-progress work at #839, which was made difficult by positioning, impact of style cascade. With refactoring to Popover component in #2160, I suspect it will become very easy to implement tooltips.

@aduth
Copy link
Member Author

aduth commented Aug 11, 2017

Considering this closed by #2293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later
Projects
None yet
Development

No branches or pull requests

6 participants