Repository navigation
Set each command's keys beside its words in the keyboard shortcuts dialog - #3915
Merged
Merged
Conversation
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
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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]>
leaf-agent
approved these changes
Oct 25, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-columnundertable-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'soverflow-x: autoand 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:
aria-describedby), so they're read whether or not they're visible.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
trortbody, or a key by itstd, 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.