Skip to content

Set each command's keys beside its words in the keyboard shortcuts dialog - #3915

Merged
max-sixty merged 7 commits into
mainfrom
agent-aea1207abffb6e427
Oct 25, 2026
Merged

max-sixty merged 7 commits into
mainfrom
agent-aea1207abffb6e427

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The keyboard shortcuts dialog (?) drew a hairline under every row and stood each key far from its command. Both came from it being an HTML table. The hairlines were the document's data-table rule (:is(th, td) { border-bottom } in reading.css), which reached the dialog's cells because nothing reset it. The key column was a fixed 104px (--lf-command-key-column under table-layout: fixed), not sized to its content: the median key is 24px wide, so a one-letter key stood about 80px from its command, and the three longest binding lists (162, 128 and 100px) still wrapped inside it. As a table it also took the document's overflow-x: auto and its scroll-edge fade.

The results are now rows of the ARIA grid cells they already declared, laid out one row at a time. Each row reads: the command, its keys 10px after it, then its description. A long binding list widens only its own row. Rows part by their padding and sections by the space above their heading, so there are no hairlines. The command button stretches over its row, so a press on the keys or description runs it, and the row wears the button's wash and focus ring.

Descriptions, and the "Quick keyboard shortcuts" setting's help line, no longer show at rest:

  • Hover, selection, focus: a description shows on its row's own line, dim and cut short with an ellipsis, for the row under the pointer, the row selected from the search, and the row holding focus. Because it takes no new line, nothing below moves when it appears. The setting's help shows on its label's line while the pointer is over it or the checkbox has focus.
  • Screen readers: both stay in the accessibility tree as the control's description (aria-describedby), so they're read whether or not they're visible.
  • Touch (hover: none): a finger has no way to reveal them, so each shows at rest under its command or label.

A match's scope ("On a disclosure") now sits beside its command and wraps when the row is narrow. The flex layout it replaced never applied in Chromium, where the scope ran into the command.

The choice between keys at the row's end, a menu-width dialog and keys right after the words was made on before/after captures; this lands the last one.

Tests: every test that found reference rows by tr or tbody, or a key by its td, now uses the grid roles and classes. The phone check asserts that no key overflows its cell or covers its command, and that a match's scope neither covers its command nor wraps its words, rather than pinning where the scope starts.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 6 commits October 19, 2026 19:07
The reference was an HTML table whose key column was a fixed 104px
(`--lf-command-key-column` under `table-layout: fixed`), not sized to its
content: a one-letter key stood about 80px from its command, and the three
longest binding lists (162px, 128px and 100px wide) wrapped inside it anyway.
As a table it also took the document's data-table rules, the hairline under
every cell and `overflow-x: auto` with its scroll-edge fade.

The results are now rows of ARIA grid cells (they already declared the grid
and gave the table `role=presentation`). Each row sets its command at the
list's edge and its keys at the row's end, as a command palette does, so a
long binding list widens only its own row. Rows part by their padding and
sections by the space above their heading; the selected or hovered row's wash
and its focus ring span the keys. Keys center on their command's line,
which also fixes a 7px drift under a finger, where the button is 44px tall.

Tests select rows by role instead of `tr`. The phone geometry check reads
the results scroller rather than each table, and compares a key with its
command's line rather than with the top of the action cell.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	skills/leaf/kernel/kernel.json
… demand

Keys at the row's end stood about 300px from short commands in the 520px
dialog. Shortcut references keep a key next to its words (Gmail's `?`, GitHub's
table) or set keys right only in a menu-width column, and none sets a
description under every row. So each row now reads command, keys 10px after,
then its description: one dim line, cut short, shown only for the hovered,
selected or focused row, so nothing below moves when it appears. It stays in
the accessibility tree as the command's description. Without hover, each
description shows at rest under its command, since a finger has no other route.

The description is its own grid cell. The command button stretches over its
row, so a press on the keys or description runs the command, and the row wears
the button's wash and focus ring. A match's scope now sits beside its command
and wraps when the row is narrow, instead of a flex row Chromium never laid
out (the scope ran into the command there).

Tests: every test that found reference rows by `tr` or `tbody`, or a key by
its `td`, now uses the grid roles and classes. The phone check asserts that
no key overflows its cell or covers its command and that a match's scope
neither covers its command nor wraps its words, rather than pinning where
the scope starts.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…r focused

The line under "Quick keyboard shortcuts" now gets the command rows'
description treatment: it sits on the label's line, cut short if it must be,
and shows while the pointer is over the setting or it holds focus. It stays
the checkbox's accessible description, and without hover it shows at rest
under the label.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	browser/runtime/chrome.css
#	browser/styles/chrome.css
#	skills/leaf/kernel/kernel.json
#	skills/leaf/kernel/leaf.js
#	tests/browser/margin/test_clusters.py
#	tests/browser/navigation/test_key_surfaces.py
#	tests/journeys/test_render_navigation.py
leaf-agent
leaf-agent previously approved these changes Oct 25, 2026
Rows the reference can't run carry no button, so the overlap check read a null.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit cef584a into main Oct 25, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-aea1207abffb6e427 branch October 25, 2026 07:30
leaf-agent added a commit that referenced this pull request Oct 25, 2026
The native-control keyboard test still looked for an HTML `tr` after
#3915 changed the command reference to ARIA grid rows. It therefore
missed the existing “Grab the card” command and timed out in [the failed
main run](https://github.com/max-sixty/leaf/actions/runs/40173703910).

Find the row by its accessibility role, preserving the assertions that
it advertises Space, Space lifts the board card, and Escape drops it.
This changes no product behavior. The focused test passes with the
corrected selector; Ruff checks and formatting pass.

The run's separate resolved diff-thread layout-shift failure is being
investigated independently.

Co-authored-by: leaf-agent <[email protected]>
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.

2 participants