Skip to content

Remove first item selected on focus for delaunay overlay #338

@henryjameslau

Description

@henryjameslau

Description:
Currently, when a chart using the Delaunay overlay is clicked or receives focus, the first data point is automatically highlighted and its tooltip is shown. This can be confusing, as it implies a selection before any user interaction. Ideally, the chart should only highlight a data point when the user starts navigating with keyboard controls (e.g., arrow keys), not just on focus. As noticed by @SamWDataVis

Steps to Reproduce:
Render a chart with the Delaunay overlay.
Click on the chart or tab to it to give it focus.
Observe that the first data point is immediately highlighted and its tooltip appears, even if no keyboard navigation has occurred.

Expected Behavior:
When the chart receives focus (via click or keyboard), no data point should be highlighted by default.
Highlighting and tooltips should only appear when the user starts navigating with keyboard controls.

Actual Behavior:
The first data point is automatically highlighted and its tooltip is shown as soon as the chart is focused.

Suggested Solution:
Update the focus behavior so that no data point is selected/highlighted until the user initiates keyboard navigation.

Additional Context:
This change would improve accessibility and user experience by making the selection behavior more predictable and less intrusive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions