Skip to content

fix(web): make insights info tooltips and legend keyboard/screen-read… - #604

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-tooltip-keyboard-a11y
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/insights-tooltip-keyboard-a11y

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The InfoTip tooltips on the Insights page (including the Visibility score explainer) and the chart legend items only responded to mouse hover, with no way for keyboard or screen-reader users to reach them.

  • InfoTip: trigger is now focusable (tabIndex={0}), opens/closes on focus/blur in addition to hover, dismisses on Escape, and has aria-label + role="tooltip"/aria-describedby wiring so screen readers announce the content
  • Chart legend items: same focus/blur handling added (mirrors existing hover-to-highlight behavior), plus aria-label and a focus-visible ring

Hover behavior is unchanged.

Related issue

Closes #588

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct ARIA wiring — useId + role=tooltip + conditional aria-describedby is exactly the right pattern, and the legend reuses the existing highlight state cleanly. Thanks!

@gkhngyk
gkhngyk merged commit 6d72aae into ansvisor:main Aug 3, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

Insights: KPI info tooltips are mouse-only — not reachable by keyboard or screen reader

2 participants