Skip to content

Tooltip cannot be closed with Escape key聽#510

Open

Description

@Jack-P1

The tooltip cannot be closed via the escape key, as expected in the keyboard interactions of the aria pattern: https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/.

I see two previous issues regarding this but cannot see why they were closed.

Activity

  1. nrps9909 commented on Aug 27, 2026

    @nrps9909
    Contributor

    This is resolved in the current dependency stack by react-component/trigger#594, merged as aee09a35757ce262ded7bfbcf028f86f2f6420e6 on 2026-01-04.

    Current Tooltip master depends on @rc-component/trigger ^3.10.0; I verified it with trigger 3.10.1 and portal 2.2.1 using a temporary integration test that explicitly disabled Tooltip's normal Trigger test mock. After opening an uncontrolled click tooltip, dispatching Escape on window called onVisibleChange(false) and hid the popup. The probe passed and was removed afterward, leaving the worktree clean.

    The regular Tooltip unit suite's manual Trigger mock does not implement this integration behavior, which is why the resolution is not visible from its mocked tests. The canonical Trigger suite does retain Escape coverage, including nested popups closing from the inside out.

    Based on the real-dependency result, this issue can be closed as completed; adding a permanent unmocked Tooltip integration regression could still be useful but no production fix is currently missing.

    AI assistance disclosure: Codex was used to trace the current dependency and merged implementation, construct/run the isolated integration probe, and draft this update. I verified the dependency versions, callback, DOM state, and clean worktree before posting.

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

Metadata

Metadata

Assignees

No one assigned

    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