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

[Meta][EuiTooltip] Flexibility, accessibility & guidelines #4040

Closed
7 tasks
cchaos opened this issue Sep 15, 2020 · 4 comments
Closed
7 tasks

[Meta][EuiTooltip] Flexibility, accessibility & guidelines #4040

cchaos opened this issue Sep 15, 2020 · 4 comments

Comments

@cchaos
Copy link
Contributor

cchaos commented Sep 15, 2020

Flexibility

Currently, adding EuiTooltip can be a bit of a pain because you have to wrap your component with the EuiTooltip component, which creates a wrapping DOM element, which may not display as you need so you have to pass an anchorClassName to override the display...

A couple of ways we can make adding tooltips easier and more flexible:

Accessibility

Following watching this presentation on the accessibility and overall useful "tips" for tooltips. My takeaways for EuiTooltip (understanding that tooltips in EUI are here to stay 😉 ):

✅ On focus
✅ No dismiss on timeout
❌ Touch/eye control devices
❌ Dismiss without moving “cursor”
❌ Tooltip content is hoverable

  • Could create a toggle-able version (clickable anchor though couldn’t have any other function).
  • And/or just simply supply a close button close to the triggering element. We’d have to implement the triangle path to the tooltip. Add a floating close button to all "popovers" #3024
  • Even though she said ESC may not be ideal, it may be a good solution in addition to a close button

Guidelines (added to docs in #5066)

Some additional bits we should add to doc guidelines for usage:

  • Keep it short
  • Keep in mind the purpose: naming or describing
  • Keep it non-essential
@myasonik
Copy link
Contributor

Related #3024


I'm broadly +1 on all the ideas. Each of those would improve our tooltips.

To add one more thing we could do, maybe just as usage guidelines in the docs right now, is to remind consumers that any and all content that's in the tooltip looses all structure so anything other than a naked string is probably better suited for something else (e.g., headings are lost, actions are practically unreachable).

@cchaos
Copy link
Contributor Author

cchaos commented Sep 16, 2020

Here's a start on some good do's and don'ts:

Don't: Put interactable content in a tooltip
Do: Use a popover

Don't: Hide important validation information behind a tooltip
Do: Use inline help text

Don't: Put formatted text in the tooltip
Do: Unless it can have the same meaning if read as plain text

@cchaos cchaos changed the title [EuiTooltip] Accessibility [EuiTooltip] Accessibility & guidelines Sep 16, 2020
@cchaos cchaos changed the title [EuiTooltip] Accessibility & guidelines META: [EuiTooltip] Flexibility, accessibility & guidelines Sep 18, 2020
@cchaos
Copy link
Contributor Author

cchaos commented Sep 18, 2020

As a side note, some of the more a11y focused efforts here could also be pushed onto EuiPopover as well.

@cchaos cchaos changed the title META: [EuiTooltip] Flexibility, accessibility & guidelines [EuiTooltip] Flexibility, accessibility & guidelines Sep 20, 2020
@JasonStoltz JasonStoltz changed the title [EuiTooltip] Flexibility, accessibility & guidelines [Meta][EuiTooltip] Flexibility, accessibility & guidelines Jan 23, 2023
@cee-chen
Copy link
Member

Closing this as not planned due to the age of the issue and lack of owner.

@cee-chen cee-chen closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants