Skip to content

[EuiTooltip] a11y - fix missing tooltip content announcement#9403

Draft
alexwizp wants to merge 8 commits intoelastic:mainfrom
alexwizp:feb-20
Draft

[EuiTooltip] a11y - fix missing tooltip content announcement#9403
alexwizp wants to merge 8 commits intoelastic:mainfrom
alexwizp:feb-20

Conversation

@alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Feb 20, 2026

Summary

This PR fixes an accessibility issue in EuiTooltip where tooltip content wasn’t consistently announced by screen readers. The root cause was delayed tooltip content rendering while aria-describedby already referenced the tooltip id, leaving assistive tech with nothing to read at the time of focus/hover.

To address this, the JS-based timeout/delay was removed in favor of CSS-driven styles for the visual delay/transition. This ensures the described element exists when aria-describedby points to it, while keeping the same UX behavior.

Key changes

  • Removed the JS timeout that delayed tooltip content mounting/rendering.
  • Implemented the delay/visibility behavior using CSS styles instead of JS timers.
  • Ensured the tooltip content is present in the DOM when referenced by aria-describedby, so screen readers can announce it reliably.
  • Removed _isMounted. I’m not entirely sure why we need this field, since it exists outside the standard component lifecycle methods.

Key changes

  • Fixes missing/late announcements caused by aria-describedby referencing an element that was not yet rendered.

Why are we making this change?

Screen readers cannot announce a description that doesn’t exist yet. By removing JS-driven delayed rendering and relying on CSS for presentation, we keep the element available for assistive technologies while still achieving the intended visual timing for sighted users.

Screenshots #

Screen.Recording.2026-02-20.at.18.41.53.mov

Impact to users

Previous behavior retained

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💔 Build Failed

Failed CI Steps

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants