Skip to content

Webapp [Charts]: Fix line chart focus management

Warren Gifford requested to merge vk/fix-line-chart-focus into main

Created by: vovakulikov

Closes https://github.com/sourcegraph/sourcegraph/issues/37885 Fixes https://github.com/sourcegraph/sourcegraph/issues/38304 Fixes part of https://github.com/sourcegraph/sourcegraph/issues/38269

Background

This PR fixes the focus flow for the line chart. Before this PR change, we had a completely broken focus management in the line/bar chart. Now you should be able

  • Go through all points with a link with the tab key
  • Tooltip should stick with focused points, but it shouldn't deactivate the mouse-based position for the tooltip element if the user cursor is moving.

Test plan

  • Go to the line chart storybook stories
  • Try to go through all points by keyboard tab-click
  • You should see that all points on the chart are accessible through keyboard navigation
  • You also should see that the line chart tooltip is rendered when one of the points is focused.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading