Skip to content

Give the grid a keyboard path for sorting, selection and copy #852

Closed

Description

@EVWorth

Severity: P2 (accessibility).

What happens

On http://localhost:1420/?mock=connected:

  1. Run SELECT * FROM orders. Column headers and rows are not focusable, so there is no way to sort a column or select rows without a mouse.
  2. Click row 2, then Shift+click row 4. The rows are selected, and the browser also highlights the cell text across them.
  3. Press Ctrl+C. The clipboard gets the browser's text selection, one value per line (879\ndelivered\n535.20\n...), not the selected rows as TSV. Only the right-click menu and the footer Copy produce proper TSV.

FR-3.3.1 and FR-3.3.2 ask for keyboard selection; DataGrip, DBeaver and TablePlus all copy selected rows on Ctrl+C.

Cause

  • src/components/grid/GridHeaderCell.tsx:73-105: sorting is an onClick on a th/div, with no tabIndex or key handler.
  • src/hooks/useRowSelection.ts:31-41 handles only Ctrl+A.
  • Grid cells allow native text selection, so Shift+click also selects text.

Fix

  • Make each header focusable (a button inside the th), with Enter/Space to sort and Shift+Enter to add a sort key.
  • Give the grid a roving focus with arrow-key row and cell navigation.
  • Add Ctrl+C that copies the selected rows as TSV.
  • Set select-none on the cells so Shift+click does not create a text selection.

Part of #783.

Activity

  1. added
    enhancement
    on Oct 21, 2026
  2. EVWorth commented on Oct 30, 2026

    @EVWorth
    OwnerAuthor

    Fixed in #922. Arrow keys now move between cells, with Home/End and Ctrl+Home/End, Enter/F2 to edit, and Ctrl+C to copy a cell. Header sort, row selection and TSV copy came in #908.


    Generated by Claude Code

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions