Skip to content

fix: show hover-only controls on keyboard focus - #896

Merged
EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h
Oct 25, 2026
Merged

EVWorth merged 1 commit into
mainfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Fixes #784, a cross-cutting item from the October UX review: some row actions were drawn as opacity-0 group-hover:opacity-100 with nothing for keyboard focus, so keyboard users tabbed onto buttons they couldn't see. An implementer-frontend subagent made the change.

Changes

#886, #888 and #891 had already fixed the connection tabs, the Connect popover, the history rows and the status bar. A re-audit against current main found the remaining cases:

  • ServerVariablesTab
    • The copy-name and copy-value icons now also show on group-focus-visible.
    • The edit pencil shows on focus-visible.
    • The pencil's group-hover:opacity-100 is removed. It never worked, because no ancestor has group; the existing [tr:hover_&] still reveals it on hover.
  • Schema tree "View Structure"
    • The button is now tabIndex={-1}, so it's no longer an extra Tab stop after every table. The row's menu already offers View Structure, and the tree's own keyboard handling (Make the tree and its context menus keyboard-navigable #823) reaches it.
    • It shows while its row has keyboard focus (group-has-[:focus-visible]/table).
    • It has an aria-label naming its table.
  • Guard test (src/__tests__/hover-only-controls.test.ts)
    • It fails on any group-hover:opacity-N or group-hover:visible in src/components that has no focus counterpart on the same line, and lists offenders as file:line.
    • It has a short allowlist, each entry with a reason, and a second test that fails if an allowlisted line no longer exists.
    • Against main without this fix, it lists exactly the four lines fixed here.

One entry stays allowlisted for now: the grid's NULL toggle in EditableCell.tsx:166. It's being fixed in the editor/grid batch that is in flight, and that change will drop the allowlist entry.

Closes #784.

Test plan

  • npm run test:unit: 3,441 tests passed.
  • npm run type-check, dprint and lint are clean (no new warnings).
  • New browser test ServerVariablesTab.browser.test.tsx checks computed opacity goes from 0 to 1 on keyboard focus. It failed with expected '0' to be '1' before the fix.
  • New jsdom test "keeps View Structure out of the tab order, reachable from the row's menu". It failed before the fix.
  • Sidebar.browser.test.tsx passes 55/55.

Generated by Claude Code

The server variables edit pencil and copy icons stayed at opacity 0 when
tabbed onto. The schema tree's View Structure button was a stray Tab stop
after every table; it now leaves the tab order (the row's context menu
has the same action) and shows while its row has keyboard focus.

A unit test fails on any group-hover reveal in src/components without a
focus counterpart on the same line.

Closes #784.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit 3eebaa6 into main Oct 25, 2026
12 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch October 25, 2026 02:39
@github-actions github-actions Bot mentioned this pull request Nov 8, 2026
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.

Make hover-only controls visible when they have keyboard focus

2 participants