Repository navigation
[WC-3663]: Default tooltip to Hover,focus and open Click tooltips from the keyboard - #2526
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
iobuhov
previously approved these changes
Nov 12, 2026
…m the keyboard Open on now defaults to Hover,focus, so new tooltips open on keyboard focus. Existing widgets keep their stored value, and Hover stays mouse-only. Click mode toggles the tooltip on click, Enter and Space in the capture phase. This also works for Mendix action buttons, which dispatch no click for Enter and stop propagation of click and keydown when they have an action. The trigger's own action still runs. WC-3663 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WC-3663 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yordan-st
force-pushed
the
tooltip/open-on-keyboard-focus
branch
from
November 16, 2026 09:13
c6e114b to
4c1d2f0
Compare
This comment has been minimized.
This comment has been minimized.
Ignore repeated keydowns from a held key, only open (never close) on clicks in form controls such as text boxes and check boxes, and ignore events from a tooltip nested inside the trigger.
Move focus back to the trigger when Escape closes the tooltip while focus is inside its content, and keep a Hover,focus tooltip open while focus moves between the trigger and its content.
Contributor
AI Code Review
What was reviewed
Skipped (out of scope): lockfiles and generated files. CI: pending: Run code quality check, Plan E2E matrix, sigridci · unrelated failures: security/snyk (external scanner, while the code and license Snyk checks pass) Questions
Positives
|
leonardomendix
approved these changes
Nov 17, 2026
samuelreichert
approved these changes
Nov 18, 2026
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.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
Keyboard users can't see the tooltip with the default settings (WC-3663). The default Open on value is Hover, which opens on mouse hover only. The Deque tooltip pattern says a tooltip must open on both hover and focus.
We decided to keep Hover and Hover,focus as separate options, and to change the default instead:
hover,hoverFocusorclick.While reproducing the issue, we found that Click mode didn't work with Mendix action buttons:
clickfor Enter, and Floating UI'suseClickignores keydown on buttons. Enter and Space did nothing.clickandkeydown. The tooltip didn't open at all, not even on a mouse click. The button's action still ran.useClickis replaced withuseKeyboardClick(src/utils/useKeyboardClick.ts). It toggles on click, Enter (keydown) and Space (keyup) for buttons and links, in the capture phase. It never stops propagation or prevents default, so the trigger's own action still runs. A key press records that it toggled the tooltip, so a native click that follows doesn't toggle it again. Text inputs never match, so typing doesn't toggle the tooltip.The OpenSpec spec is in
openspec/specs/tooltip-keyboard-access/, and the archived change with the design is inopenspec/changes/archive/2026-11-11-open-tooltip-on-keyboard-focus/.Related: #2175 (WC-3404, screen reader description). That PR announces the tooltip to screen readers in every mode, and this one covers sighted keyboard users. They touch different source files (
Tooltip.tsxthere,useFloatingUI.tshere), so onlyCHANGELOG.mdandTooltip.spec.tsxshould conflict.Not done yet:
tooltip-webtest project needs pages with action button triggers in each mode.Unit tests (22, 15 new) and lint pass locally.
What should be covered while testing?
In an app with Tooltips on action buttons, one with an action and one with Do nothing: