Wallet chip menu: Escape dismiss + semantic backdrop (a11y) #187
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Wallet dropdown uses a bare
<div className="fixed inset-0" onClick=…>with no role and no Escape handler at the menu level (Layout.tsxEsc only closes More nav). #140 scope B sibling.Acceptance criteria
type="button"+aria-label="Close wallet menu") matchingLayout.app-menu-dismisspattern.Escapecloses wallet menu when open (without breaking More menu Esc).:focus-visibleon new control perAGENTS_FRONTEND_A11Y_FOCUS.md.Relates to: #140
cc @Brouie
marked as related to #140
mentioned in issue #140
mentioned in commit
6a44a6e67aImplementation (pushed to
main@6a44a6e)Wallet connected dropdown now matches the shell More menu dismiss pattern (#187):
fixed inset-0<div onClick>scrim with a semantictype="button"using classapp-menu-dismissandaria-label="Close wallet menu"(WalletButton.tsx).Escapecloses the wallet menu while it is open (windowkeydown listener scoped toshowDropdown);Layout.tsxMore / mobile More Escape behavior is unchanged.:focus-visibleinset ring on.app-menu-dismissinindex.css(shared by shell nav and wallet backdrop).WalletButton.test.tsx).Docs / agent playbooks:
docs/frontend.md(connected wallet chip + keyboard focus rows),skills/AGENTS_FRONTEND_WALLET_CHIP.md,skills/AGENTS_FRONTEND_A11Y_FOCUS.md.Verification checklist
aria-expandedisfalse.npm test -- --run src/components/wallet/__tests__/WalletButton.test.tsxpasses locally.@Brouie — please verify the above when you have a moment. Leaving this issue open until sign-off.
mentioned in issue #188
mentioned in issue #186
mentioned in issue #185
marked the checklist item Replace click-outside scrim with semantic dismiss control
e\.g\. type\=\"button\" \+ aria\-label\=\"Close wallet menu\"matching Layout .app-menu-dismiss pattern. as completedmarked the checklist item Escape closes wallet menu when open (without breaking More menu Esc). as completed
marked the checklist item Vitest or RTL test for Esc handler where feasible. as completed
marked the checklist item :focus-visible on new control per AGENTS_FRONTEND_A11Y_FOCUS.md. as completed
qa cleared at source+test layer @PlasticDigits
verified
6a44a6e.WalletButton.tsx — keydown listener is scoped: early return when !showDropdown + dep array [showDropdown], so the More menu Esc handler isn't shadowed when the wallet menu is closed. Dismiss control has type="button", aria-label="Close wallet menu", className="app-menu-dismiss" (lines 76-77).
index.css — .app-menu-dismiss :focus-visible adds inset 2px ring via --focus-ring 28% mix, matches shell pattern (line 1158).
WalletButton.test.tsx — 8/8 passing. The #187 group:
browser walk (visual focus-ring + More-nav Esc no-regression) — getting a hard time with the tunnel setup here, conflicts with my YieldOmega forwards. Will close it out on the next clean stack session.
Browser walk done — stack came up cleanly:
7/7 items cleared. @PlasticDigits good to close.
mentioned in issue #214
mentioned in issue #671
mentioned in issue #672
marked as related to #672