a11y(2.1.1): ZoomSvg — add keyboard pan/zoom controls so the workflow family tree is operable without a mouse#3530
Open
rosanusi wants to merge 2 commits into
Open
a11y(2.1.1): ZoomSvg — add keyboard pan/zoom controls so the workflow family tree is operable without a mouse#3530rosanusi wants to merge 2 commits into
rosanusi wants to merge 2 commits into
Conversation
…2.5.1, 2.5.7) Pan was mouse-drag only; zoom was wheel only — no keyboard or single-pointer alternative. Adds panBy/zoomBy helpers, a tab-reachable button cluster (Pan Up/Down/Left/Right, Zoom In/Out, Center), and arrow-key/+/- shortcuts on the focused container. Mouse paths are unchanged. Also adds plus/minus icons. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description & motivation 💭
ZoomSvgis the pan/zoom container that hosts the workflow family tree. Pan was bound to mouse drag only; zoom was bound to the mouse wheel only. The sole keyboard-reachable control was the Center reset button. Keyboard users could not reposition or zoom the tree — a real barrier when the tree has multiple generations or wide sibling sets and nodes fall off-viewport.This PR adds three things:
panBy/zoomByhelpers — shared viewport-mutation functions, reusable by both mouse and keyboard paths.pannable/zoomableprops. Zoom buttons becomedisabledat themaxZoomIn/maxZoomOutclamp boundary.tabindex="0"container withon:keydown; arrow keys pan and+/-zoom only when the container is focused (scoped to the element, never global).plus/minusicons — added to the icon system (src/lib/holocene/icon/svg/), registered inpaths.ts.Mouse drag, wheel zoom, and the existing Center button are all unchanged.
Closes SC 2.1.1, 2.5.1, and 2.5.7 — one fix resolves all three:
Files changed (4):
src/lib/holocene/zoom-svg.svelte— all logic and template changessrc/lib/holocene/icon/svg/plus.svelte— new iconsrc/lib/holocene/icon/svg/minus.svelte— new iconsrc/lib/holocene/icon/paths.ts— registersplusandminuscloud-ui inherits the fix via the
@temporalio/uitarball repack.Closes matrix defect (d) recorded at
audit-output/vpat-matrix.md:119.Screenshots (if applicable) 📸
New button cluster appears at top-right of the ZoomSvg container alongside the existing Center button: Pan Up ↑, Pan Down ↓, Pan Left ←, Pan Right →, Zoom In +, Zoom Out −, Center ⊙.
Design Considerations 🎨
Uses the existing
Button variant="secondary" size="sm"pattern matching the Center button. No new design tokens. Button order in the cluster: pan directions first, zoom second, center last.Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
/namespaces/{ns}/workflows/{wf}/{run}/relationships).Zoomable workflow graph…, group.disabled. Confirm the boundary clamp is respected.disabled. Same check atmaxZoomOut.<div>itself. Press Arrow keys — confirm the viewport pans. Press+/-— confirm zoom. Confirm these shortcuts only fire when the container is focused (Tab away and press arrow keys; should have no effect on the graph).aria-labelkeyboard description; confirm each button announces asPan up, buttonetc.Checklists
Draft Checklist
Merge Checklist
disabledstate at clamp boundaries verifiedIssue(s) closed
Closes finding #10 from
audit-output/issues/2.1.1-keyboard-audit.md.Closes matrix defect (d) at
audit-output/vpat-matrix.md:119.Also closes 2.5.1 and 2.5.7 angles per
audit-output/issues/2.5.1-pointer-gestures-verification.md§1.4.Docs
Any docs updates needed?
No doc changes needed.
A11y-Audit-Ref: 2.1.1-zoom-svg-pan-zoom-keyboard