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

inconsistent tool tips #8829

Closed
martinpitt opened this issue Mar 14, 2018 · 8 comments
Closed

inconsistent tool tips #8829

martinpitt opened this issue Mar 14, 2018 · 8 comments
Assignees

Comments

@martinpitt
Copy link
Member

martinpitt commented Mar 14, 2018

We currently have at least three tooltip styles. On our React pages, like kdump or React Patterns:

tooltip-react

On the system page there are "broken" ones on Hardware and Machine ID, as well as the navigation menu items on the left:

tooltip machine id

This is because this just sets the title= attribute instead of using the jQuery .tooltip() method. When doing that, they look like the React ones:

tooltip-system-fixed

Finally, on the system page on the blue (i)s we have this style, which also needs to be clicked, not just hovered:

tooltip-system-2

We should pick one style and apply it consistently.

The React one has a nice contrast and looks a little more "distinguished". The latter (white) one is nicer for showing icons, as the grey one has poor contrast in this case:

tooltip-system-updates

(The text color is wrong, I haven't looked into that yet - but the icon is the point here)

Hint from @garrett: try text-shadow

@garrett
Copy link
Member

garrett commented Mar 14, 2018

Accessibility concerns:

  1. title should be used when possible; if it gets "upgraded" from the browser-based tooltip to the richer one, fine, as along as it's accessible.
  2. For the "synchronized with" — would you really want a robotic voice reading off that IPv6 hostname to you? We need to be aware of problems like this (as aXe and other tools will not let us know).

@andreasn
Copy link
Contributor

I think those are good accessibility concerns regarding the IPv6 hostname, and thanks for bringing those up!
But let's keep this issue about the presentation of the different tooltips, and then file specific a11y bugs as separate issues.

@garrett
Copy link
Member

garrett commented Mar 14, 2018

Browser tooltips

  • uses the title attribute; browser handles this natively
  • Example: second screenshot, system hardware information
  • Browsers tooltips should not be used. These should be upgraded to PatternFly / jQuery rich tooltips.

PatternFly & jQuery tooltips

  • PatternFly's implementation of tooltips; style and functionality is also shared with jQuery's .tooltip()
  • Example: first screenshot, kdump status
  • Tooltips should be used when extra information should be handled.

PatternFly Info Tips

  • PatternFly's Info tips: requires clicking and can be interacted with
  • Example: fourth screenshot, system time
  • Info tips should be used when contextual menus are needed.

Summary: Use PatternFly / jQuery tooltips when you need tooltips. Info tips should only be used when you expect interaction.

@garrett
Copy link
Member

garrett commented Mar 14, 2018

(The above is based on a conversation on IRC earlier today. Please correct if wrong.)

@martinpitt
Copy link
Member Author

Thanks @garrett for the summary! So I'll go with the transparent-gray notifications by default on the systems page and the menu navigation for now, and will try text-shadow for the icons.

@martinpitt
Copy link
Member Author

The nav menu also uses browser "title" style tooltips:

tooltip-menu-standard

But converting them to the jquery/PF ones looks really crappy, due to gray-on-gray:

tooltip-menu-jquery

So I suppose I leave these alone for now, and just clean up the /system page for now.

@garrett
Copy link
Member

garrett commented Mar 15, 2018

Yikes. I think titles are only needed in the navigation when the string is truncated anyway. It's visible and screen readers should pick up the items without resorting to title.

When I redid the nav, I tried to make sure even the longest of our labels fit in without truncation. Perhaps we can just remove the title attributes in this subnav? 🤷‍♂️

@martinpitt
Copy link
Member Author

Perhaps we can just remove the title attributes in this subnav

Indeed! They are just redundant. The simplest ideas are the best 👍

martinpitt added a commit to martinpitt/cockpit that referenced this issue Mar 19, 2018
These are exactly as (non-)interactive as the Hardware Info and Machine
ID tooltips, so replace them with a standard bootstrap tooltip. This
makes all tooltips on the system page work in the same way. Drop the
static blue (i) button for the performance profile, but keep the dynamic
info icon for the time, as it changes between "off", "in progress", and
"enabled" NTP syncing.

Implementation note: While bootstrap tooltips *can* be made to use the
standard `title` attribute, this will always additionally trigger the
standard browser tooltips, which we don't want. So change bootstrap
tooltip's `data-original-title` field instead.

In tuned's link.html, wrap the link into an extra `<span>` and attach
the tooltip to that, so that it works even if the link is disabled (if
tuned is not installed).

Also fix the tuned status to react to tuned.service starting and
stopping, instead of only updating on a button click (which is now not
even available any more with the removal of the (i) button).

Fixes cockpit-project#8829
Closes cockpit-project#8835
larskarlitski pushed a commit that referenced this issue Mar 21, 2018
These are exactly as (non-)interactive as the Hardware Info and Machine
ID tooltips, so replace them with a standard bootstrap tooltip. This
makes all tooltips on the system page work in the same way. Drop the
static blue (i) button for the performance profile, but keep the dynamic
info icon for the time, as it changes between "off", "in progress", and
"enabled" NTP syncing.

Implementation note: While bootstrap tooltips *can* be made to use the
standard `title` attribute, this will always additionally trigger the
standard browser tooltips, which we don't want. So change bootstrap
tooltip's `data-original-title` field instead.

In tuned's link.html, wrap the link into an extra `<span>` and attach
the tooltip to that, so that it works even if the link is disabled (if
tuned is not installed).

Also fix the tuned status to react to tuned.service starting and
stopping, instead of only updating on a button click (which is now not
even available any more with the removal of the (i) button).

Fixes #8829
Closes #8835
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants