Repository navigation
feat(viewer): accessibility and responsive layout (M6-05) - #134
Conversation
Keyboard tree navigation (Enter/Space/arrows/Escape), skip link, landmarks/ARIA labels, focus-visible styles, improved muted-text contrast, and mobile breakpoints for the inspection layout. Adds a Playwright a11y smoke covering landmarks and keyboard activation. Addresses #46. Co-authored-by: DrunkOnJava <[email protected]>
53ebb0f to
7d1cb4c
Compare
Update Lane Eleven triage log for thiserror (#132), criterion (#133), three (#135), viewer a11y (#134), and remaining open majors TS7/cfb. Co-authored-by: DrunkOnJava <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.
| min-height: 42vh; | ||
| } | ||
| #sidebar-right { | ||
| order: 4; |
There was a problem hiding this comment.
Mobile grid rows ignore order
Medium Severity
grid-template-rows is written for DOM order, but order places #viewport in the second track and #sidebar-left in the third. Auto-placement therefore gives the minmax(42vh, 52vh) row to the scene tree, while the 3D view sits in an auto row. Combined with the tree’s max-height: 36vh, the stacked layout leaves a gap and does not size the viewport as the breakpoint intends.
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.
| } | ||
| #demo-gallery { | ||
| width: min(100%, 560px); | ||
| } |
There was a problem hiding this comment.
Dropzone overflows short mobile viewport
Medium Severity
The new ≤960px layout shrinks #viewport to about 42vh, but #dropzone stays an absolutely positioned, unscrollable flex column with justify-content: center. #demo-list still uses max-height: min(42vh, 360px), so the picker and gallery are taller than the viewport. Centered overflow clips the top of the dropzone and paints over the stacked sidebars.
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.
| card.setAttribute( | ||
| 'aria-label', | ||
| canOpen ? `Open demo ${demo.name}` : `Demo unavailable: ${demo.name}`, | ||
| ); |
There was a problem hiding this comment.
Demo cards lose widget roles
Medium Severity
Setting role="listitem" on the demo <button> and <a> replaces their implicit button and link roles, so assistive tech no longer treats the cards as controls. The new aria-label also replaces the name computed from the card body, hiding format, version, quality, and availability text that fillDemoCard already renders.
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.
| if (node.children.length > 0) { | ||
| const ch = document.createElement('div'); | ||
| ch.className = 'tree-children'; | ||
| ch.setAttribute('role', 'group'); |
There was a problem hiding this comment.
Scene tree ARIA pattern is invalid
Medium Severity
Each .tree-node is a treeitem with tabIndex 0, while role="group" is a sibling under an un-roled wrapper rather than a child of the parent item. The tree therefore has no programmatic hierarchy, Tab stops on every node, and the new .selected state is never exposed via aria-selected.
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.


Summary
Viewer accessibility / responsiveness pass for M6-05 / #46:
:focus-visiblestyles + improved muted-text contrast≤960px/≤560px) so inspection works without horizontal overflowEvidence
npm run typecheckclean (withviewer/pkg)npm run buildcleanloads the viewer shell+accessibility shell— 2 passedTest plan
Closes #46.
Note
Low Risk
UI-only HTML/CSS and client-side keyboard handlers; no changes to parsing, WASM, or export logic beyond labels and copy.
Overview
Implements M6-05 / #46: an accessibility and responsive-layout pass on the client viewer shell without changing decode or export behavior.
Accessibility: Adds a skip link to the viewport, semantic landmarks (
banner,main, labeled asides), and ARIA on exports, status/live regions, file picker, scene tree (role="tree"/treeitem), demo list items, and diagnostics. New CSS covers:focus-visiblerings, tree focus styling, slightly brighter muted text for contrast, andprefers-reduced-motionon the dropzone. Keyboard: scene tree rows are focusable; Enter/Space selects and shows element info (with visible selection); Arrow Up/Down moves focus; Escape clears selection and refocuses “Choose file” when the dropzone is open. Demo cards get descriptivearia-labels; copy mentions keyboard tree activation.Responsive: At ≤960px the app stacks (viewport first, then sidebars) with scrollable layout; ≤560px tightens header and single-column status/info rows.
Tests: New Playwright smoke checks landmarks, skip link, tab focus, and (when the architectural demo is enabled) Enter on demo + tree and Escape clearing selection.
Reviewed by Cursor Bugbot for commit 7d1cb4c. Configure here.