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

[Tooltip] A11y and interaction improvements #222

Open
3 tasks
kongsgard opened this issue Jul 2, 2024 · 1 comment
Open
3 tasks

[Tooltip] A11y and interaction improvements #222

kongsgard opened this issue Jul 2, 2024 · 1 comment

Comments

@kongsgard
Copy link

kongsgard commented Jul 2, 2024

I've listed a few suggestions below on the tooltip interaction.

  • Trigger the tooltip when hovering points on the edge of the chart

    • The hover area for points along the edge of the chart (for instance along the x- or y-axis) is reduced as the tooltip is triggered only when hovering inside the chart. This can be experienced in the examples in the documentation. Is there a way to improve this behavior?
  • Accessibility for the tooltip onClick prop

    • It would be nice to be able to tab between each of the elements when this prop is set.
  • Optionally set the tooltip to be persistent (like a popover) on click

@techniq
Copy link
Owner

techniq commented Jul 2, 2024

@kongsgard This is all great feedback and has been on my mind

  • Trigger the tooltip when hovering points on the edge of the chart
    • This is a little tricky since padding is used for the axis "gutters". Based on the tooltip mode (ex. bisect-x) this should be possible, and mostly comes down to increasing the width of the container in TooltipContext, but there would need to be more thought to make sure it wouldn't case regressions / unexpected results, if it should be something you opt-into, and can it work for all modes (not sure it could for band off the top of my head).

  • Accessibility for the tooltip onClick prop
  • Optionally set the tooltip to be persistent (like a popover) on click
    • Agree. I've seen projects like data-ui do similar and would be a great accessibility and usability win.

Exploration:

@techniq techniq changed the title Tooltip improvements [Tooltip] A11y and interaction improvements Jul 8, 2024
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

2 participants