fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession - #1855
fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession#1855molecule-ai[bot] wants to merge 0 commit into
Conversation
47d2eb7 to
5d273ee
Compare
5d273ee to
c21d315
Compare
… alias The PR #1855 branch contains a newer version of session_auth.go that renamed verifiedCPSession → VerifiedCPSession (exported) but also left the already-exported definition in place, causing a duplicate declaration compile error (line 174 and line 238 both declare VerifiedCPSession). Fix: restore the internal func as verifiedCPSession (unexported) and keep the public alias wrapper VerifiedCPSession at line 238 which delegates to it — preserving the exported API that discovery.go and wsauth_middleware.go depend on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a044243 to
460e754
Compare
… alias The PR #1855 branch contains a newer version of session_auth.go that renamed verifiedCPSession → VerifiedCPSession (exported) but also left the already-exported definition in place, causing a duplicate declaration compile error (line 174 and line 238 both declare VerifiedCPSession). Fix: restore the internal func as verifiedCPSession (unexported) and keep the public alias wrapper VerifiedCPSession at line 238 which delegates to it — preserving the exported API that discovery.go and wsauth_middleware.go depend on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Technical Review — PR #1855: fix(canvas/a11y): aria-hidden backdrop + test normalization + verifiedCPSession
LGTM with one note
Changes
-
MissingKeysModal.tsx: Focus management refactored — removeduseRef+firstInputRefpattern, switched torequestAnimationFrame+document.getElementById("missing-keys-title")?.focus()targeting the h3 element. UsesautoFocus={index === 0}on first input as fallback. -
MissingKeysModal.tsx: Backdroparia-hiddenmoved from outer container div to the inner backdrop div (the one withonClick={onCancel}) — this is the correct approach (only the click-intercept div should be hidden, not the outer flex container). -
ClaudeSettings.test.tsx: Test mock refactored to useObject.assign(vi.fn(...), { getState: ... })pattern — ensures both selector-call and.getState()call patterns work on the mock. -
ContextMenu.keyboard.test.tsx: Test mock pattern refined.
Note on MissingKeysModal focus behavior
PR #1869 added role="dialog" aria-modal="true" aria-labelledby="missing-keys-title" to MissingKeysModal. PR #1855 removed the useRef pattern and replaced with document.getElementById("missing-keys-title")?.focus().
This approach has a subtle issue: the h3 element itself isn't focusable by default (no tabIndex or contenteditable). Focusing it may not move keyboard focus to the first interactive element. However, the autoFocus={index === 0} fallback on the input addresses this.
The useRef approach from PR #1882 (which directly focused the input ref) is more reliable. Recommend reconciling these approaches — either keep the useRef+focusInput pattern from #1882, or add tabIndex="-1" to the dialog header so focusing it moves focus into the modal's tab order.
Not a blocker for this PR — autoFocus on the input provides a working fallback.
No other blockers ✅
Pull request was closed
7395307 to
382238d
Compare
… alias The PR #1855 branch contains a newer version of session_auth.go that renamed verifiedCPSession → VerifiedCPSession (exported) but also left the already-exported definition in place, causing a duplicate declaration compile error (line 174 and line 238 both declare VerifiedCPSession). Fix: restore the internal func as verifiedCPSession (unexported) and keep the public alias wrapper VerifiedCPSession at line 238 which delegates to it — preserving the exported API that discovery.go and wsauth_middleware.go depend on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… alias The PR #1855 branch contains a newer version of session_auth.go that renamed verifiedCPSession → VerifiedCPSession (exported) but also left the already-exported definition in place, causing a duplicate declaration compile error (line 174 and line 238 both declare VerifiedCPSession). Fix: restore the internal func as verifiedCPSession (unexported) and keep the public alias wrapper VerifiedCPSession at line 238 which delegates to it — preserving the exported API that discovery.go and wsauth_middleware.go depend on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… alias The PR #1855 branch contains a newer version of session_auth.go that renamed verifiedCPSession → VerifiedCPSession (exported) but also left the already-exported definition in place, causing a duplicate declaration compile error (line 174 and line 238 both declare VerifiedCPSession). Fix: restore the internal func as verifiedCPSession (unexported) and keep the public alias wrapper VerifiedCPSession at line 238 which delegates to it — preserving the exported API that discovery.go and wsauth_middleware.go depend on. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…from docs/readme-quickstart-context into main
Summary
Core-UIUX 3-commit branch (rebased on latest staging):
fix(canvas/a11y): restore aria-hidden on backdrop div— WCAG 4.1.2 regression fix after cherry-pick conflictfix(canvas/tests): normalize useCanvasStore mock pattern— consistent mock patterns across test filesfix(middleware): rename internal fn to verifiedCPSession, keep public alias— API clarity improvementTest plan
🤖 Generated with Claude Code