Repository navigation
Web UI: full keyboard navigation in play.html - #108972
Conversation
Improve keyboard accessibility of the database panel in `play.html`: - Up/Down arrow keys now move focus between the buttons inside the panel (databases and their expanded tables), mirroring the existing Tab/Shift+Tab navigation but staying within the panel. - The database panel icon is an `<a>` element, which the browser activates with Enter (following the link) but not with Space. Both keys now toggle the panel from the keyboard once the icon is focused via Tab, instead of scrolling the page or navigating away. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Workflow [PR], commit [c8f829e] Summary: ✅
AI ReviewSummaryThis PR makes the Web UI in Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Extend keyboard navigation in the database panel of `play.html`: - When a table row is focused via keyboard navigation, its info balloon (size, rows, engine) is now shown and positioned, just like on hover. The balloon follows the row across scrolls instead of being hidden. - The Right arrow key moves focus into the balloon's links; inside the balloon Up/Down move between links, Left returns to the row, and Enter/Space activate the focused link. The balloon positioning logic is factored into a shared `positionTableBalloon` function used by hover, focus, and the scroll handler. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Make the result table usable from the keyboard in `play.html`. The table is already focusable (`tabindex="0"`), but tabbing to it did nothing visible and the arrow keys were inert until a cell was clicked. - When the focused table has no selected cell, the first arrow key now selects the first data cell, so the user can Tab to the table, navigate cells with the arrows, then Tab on to the next element. - A focus ring is shown via `:host(:focus-visible)` for keyboard focus only, so clicking a cell (which programmatically focuses the table) does not draw a ring around the whole table. The cell-selection logic is factored into a shared `_selectCell` method. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Make the toolbar controls in `play.html` fully keyboard-accessible: - The copy and download icon "buttons" (clickable `<div>`s) and the theme switcher are now in the Tab navigation sequence (`tabindex="0"`, `role="button"`) and can be activated with Enter/Space. - A focus ring is shown for keyboard focus only, via `:focus-visible`, on the real `<button>`s (Run, Run all, Download) and the icon buttons. The global rule that strips the default outline previously hid the focus location. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The download dropdown in `play.html` lives at the end of the DOM (so it can be positioned without being clipped), which put its format `<select>`, the "other format" input, and the Download button at the very end of the tab order, far from the download button that opens them. - Opening the menu now moves focus to the format selection. - Tab/Shift+Tab flow as a contiguous group right after the download button: download button -> format select -> [other format] -> Download. Leaving either end closes the menu, and Escape closes it too. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address the AI review on PR #108972: - Result table arrow navigation: `_handleKeyDown` mixed coordinate systems. `table` is the row's parent, i.e. the `<tbody>`, so `table.rows` is indexed within the section, but `row.rowIndex` is table-wide and counts the header row. From the first data row (`rowIndex == 1`), `ArrowDown` read `tbody.rows[2]` (skipping the second row) and `ArrowUp` read `tbody.rows[0]` (staying on the same row). Use `row.sectionRowIndex` so both sides share the same coordinate system. - Focused-row scroll: the branch that keeps the keyboard-focused table balloon glued to its row bypassed `hideTableBalloons` and so never set `suppress-balloons`. A different table button scrolled under a stationary cursor could then reveal its balloon at an unset position via the CSS `:hover` rule (`mouseenter` does not fire without mouse movement). Set `suppress-balloons` on the focused branch too, and add a CSS rule exempting `.table:focus-within .table-addendum` from suppression (placed after the suppress rule so it wins the specificity tie) so the focused balloon stays visible even when the cursor is over the focused row. Verified by manual keyboard navigation of the database panel (focused-row scroll with the mouse stationary over another row) and the result table (ArrowUp/ArrowDown from the first selected data cell with at least three rows). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Pushed
Verified by manual keyboard navigation of both paths and |
|
CI status on head `456242e9529`: AI Review ✅ Approve, 0 unresolved review threads, MERGEABLE. The sole red is This is the known distributed No re-merge: MERGEABLE with no conflicts and merge-base is from today (<1d), so the change is not stale. Ready to merge once CI finishes. |
…-arrow-nav Resolve the conflict in `programs/server/play.html` between this branch's keyboard-navigation work and master's Web UI changes that landed in the same area (`#108891` table count, `#108941` horizontal-scroll fix). Both branches independently extracted the result-table cell-selection logic into a `_selectCell` method, so the merge left two definitions. Keep master's `_selectCell` (it additionally focuses the cell with `td.focus({ preventScroll: true })` and manages a roving `tabindex`, which fixes the horizontal-scroll reset from `#108941`) and drop this branch's duplicate, which was a strict subset. The result-table keydown handler is attached to the host element and reads `_current_selected_cell`, so master's per-cell focus composes correctly with the arrow-key navigation added here. At the arrow-move call site, keep master's `cell.removeAttribute('tabindex')` before `_selectCell(new_cell)` to maintain the roving tabindex. All of master's additions (`.database-table-count`, `td:focus { outline: none }`, the table-count feature in `loadTables`/`loadDatabases`) and all of this branch's features (database-panel arrow navigation, focused-row balloon, toolbar/theme keyboard access, download-menu tab sequence) are preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Merged The conflict was in the result-table cell-selection code: both this branch and
The two reds on the previous head are known, unrelated server-side flakes (this change is client-side browser code and cannot affect them):
Fresh CI is running on |
|
CI status on head The sole red is This is unrelated to the change — the PR is HTML-only ( Re-triggered the failed |
|
CI status on head The one red is
Re-triggered the failed private-sync jobs (cached passing jobs untouched); |
Address the AI review on PR ClickHouse#108972: - Result table arrow navigation: `_handleKeyDown` mixed coordinate systems. `table` is the row's parent, i.e. the `<tbody>`, so `table.rows` is indexed within the section, but `row.rowIndex` is table-wide and counts the header row. From the first data row (`rowIndex == 1`), `ArrowDown` read `tbody.rows[2]` (skipping the second row) and `ArrowUp` read `tbody.rows[0]` (staying on the same row). Use `row.sectionRowIndex` so both sides share the same coordinate system. - Focused-row scroll: the branch that keeps the keyboard-focused table balloon glued to its row bypassed `hideTableBalloons` and so never set `suppress-balloons`. A different table button scrolled under a stationary cursor could then reveal its balloon at an unset position via the CSS `:hover` rule (`mouseenter` does not fire without mouse movement). Set `suppress-balloons` on the focused branch too, and add a CSS rule exempting `.table:focus-within .table-addendum` from suppression (placed after the suppress rule so it wins the specificity tie) so the focused balloon stays visible even when the cursor is over the focused row. Verified by manual keyboard navigation of the database panel (focused-row scroll with the mouse stationary over another row) and the result table (ArrowUp/ArrowDown from the first selected data cell with at least three rows). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nel-arrow-nav Web UI: full keyboard navigation in play.html
A pass over the Web UI (
play.html) to make it fully keyboard-navigable.:focus-visibleoutline is shown on the toolbar buttons.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Web UI (
play.html): full keyboard navigation — arrow-key navigation in the database panel and result table, keyboard access to the toolbar buttons, theme switcher, and download menu, and visible focus outlines.Documentation entry for user-facing changes
🤖 Generated with Claude Code