[EuiTooltip] a11y - fix missing tooltip content announcement#9403
Draft
alexwizp wants to merge 8 commits intoelastic:mainfrom
Draft
[EuiTooltip] a11y - fix missing tooltip content announcement#9403alexwizp wants to merge 8 commits intoelastic:mainfrom
alexwizp wants to merge 8 commits intoelastic:mainfrom
Conversation
Collaborator
💚 Build SucceededHistory
|
Collaborator
💔 Build Failed
Failed CI StepsHistory
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an accessibility issue in
EuiTooltipwhere tooltip content wasn’t consistently announced by screen readers. The root cause was delayed tooltip content rendering whilearia-describedbyalready 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-describedbypoints to it, while keeping the same UX behavior.Key changes
aria-describedby, so screen readers can announce it reliably._isMounted. I’m not entirely sure why we need this field, since it exists outside the standard component lifecycle methods.Key changes
aria-describedbyreferencing 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
@defaultif default values are missing) and playground toggles