Skip to content

Tooltips don't close with keyboard navigation #6937

Description

@gVguy

What is the current behavior?

  1. When you navigate to the element with keyboard (tab), the tooltip appears 👍

  2. Arrows move the tooltip between data points 👍

  3. When the focus leaves the element with another tab, the tooltip stays visible. 👎

What is the expected behavior?

When focus is navigated away from the chart, the tooltip should disappear.

Please provide a demo of the problem in a sandbox

https://stackblitz.com/edit/vitejs-vite-hgtprkcw?file=src%2FApp.tsx

There are three charts on the page, try to focus the charts with the tab key one after the other. When you navigate through all of them, you'll have three tooltips open in each one. Now press escape. All three tooltips disappear.

Image

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

3.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityIssues associated with accessibilityenhancementEnhancement to a current API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions