Skip to content

fix(macos): open row context menus from VoiceOver and the keyboard - #4664

Merged
datlechin merged 4 commits into
mainfrom
fix/mac-row-menus-accessibility
Nov 28, 2026
Merged

datlechin merged 4 commits into
mainfrom
fix/mac-row-menus-accessibility

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • VoiceOver's Show Menu on a list opens the menu of its last selected row, so it acts on the selection. With nothing selected the list keeps its empty-area menu.
  • Show Menu on a row's cell opens that row's menu. AppKit's AXRow is its own proxy element and refuses the action (-25206), so the cell answers for it.
  • Both paths hand the table the right-click event a pointer on the row would send, as AppKit does for the keyboard's menu key, so clickedRow names the row and every existing menuNeedsUpdate keeps working unchanged. One helper: Views/Shared/TableContextMenu.swift.
  • Applied to the Welcome connection list, the object tree, Favorites, the result tree view, Query Plan, the workspace rail, History, Version History, the database switcher and the data grid.
  • The data grid opens Control-Return and Show Menu on its active cell, not the middle of the selected row.
  • The menu opens after the request returns, and only if the row still shows the same item.
  • History and Version History offer Show Menu only when the list has menu items.

Test plan

  • TableContextMenuTests: clicked, selected-only and neither targets; the event for a row sets clickedRow inside the selection; row identity across a reload.
  • DataGridMenuAnchorTests: the menu opens on the active cell and acts on the selection.
  • WelcomeConnectionListUITests/testTheMenuKeyOpensTheSelectedConnectionsMenu: Control-Return on a selected connection shows Move to Project and Rename. XCUITest cannot send Show Menu; the menu key takes the same showContextMenuForSelection(_:) path.
  • Real build, driven through the AX API: results below.

@datlechin
datlechin merged commit ea66de3 into main Nov 28, 2026
9 of 10 checks passed
@datlechin
datlechin deleted the fix/mac-row-menus-accessibility branch November 28, 2026 01:00
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.

1 participant