Skip to content

Make the tree and its context menus keyboard-navigable #823

Closed

Description

@EVWorth

Severity: P2 (accessibility)

What happens

  1. Open ?mock=connected and focus the shop row in the schema tree.
  2. ArrowRight expands it, but ArrowDown and ArrowUp do nothing; focus stays on shop. The only way to move is Tab.
  3. Tab to customers and press Shift+F10. The context menu opens next to the row, but focus stays on the tree row. ArrowDown does nothing, and Tab moves focus elsewhere. The menu cannot be used without a mouse.
  4. Only database and folder rows have role="treeitem". Tables, views, routines, triggers and events are plain buttons, so a screen reader does not announce them as tree items.

The hover "View Structure" button being tabbable is tracked separately in #784.

Cause

  • src/components/schema/SchemaTree.tsx:432-441 and src/components/schema/FolderNode.tsx:39-47 handle only ArrowLeft and ArrowRight.
  • Leaf rows (SchemaTree.tsx:590, :752, :830, :906, :982, :1054) have no treeitem role.
  • src/components/common/ContextMenu.tsx:96-139 has no role="menu" or menuitem, no initial focus and no arrow handling; only Escape is handled.

Fix

  • Give the tree a roving tabindex with Up, Down, Home and End over the visible nodes, and give leaf rows role="treeitem".
  • In ContextMenu, add role="menu" and role="menuitem" and focus the first enabled item on open.
  • Handle Up, Down, Home and End in the menu, and return focus to the item that opened it when it closes.

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 24, 2026
    9f65586
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions