Repository navigation
Patch cables from the inspector without a pointer - #32
Merged
Merged
Conversation
The canvas only patches cables by dragging, so keyboard and screen-reader users could delete a cable but not make one (WCAG 2.1.1). Each output port in the inspector now has a "Patch … out to" select listing the inputs it may legally reach (graph.patchTargets reuses connectionError). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K4B4YKMC6fT9oWCCwWgt9S
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.
Before: cables on the patch canvas could only be made by dragging from a port, so a keyboard or screen-reader user could select and delete a cable but never create one (WCAG 2.1.1).
After: the inspector shows a "Patch out to" select under Ports for each output that has somewhere to go, listing only inputs it may legally reach (same kind, free, not itself). Picking one patches the cable.
How:
patchTargets(doc, catalog, node, port)ingraph/validate.tsruns every input through the existingconnectionError, so the rules stay in one place; unit tests cover kind matching, taken inputs and missing ports. Checked with a Playwright keyboard-only run ofgadgetcast -devin Chromium: Tab to the cable, Enter, Delete (1 → 0 cables), Tab to the mic node, Enter, ArrowDown in the select (0 → 1 cables). No screen-reader test.Generated by Claude Code