fixed: web(WalletModal): enable focus trap inside wallet selection modal - #577
fixed: web(WalletModal): enable focus trap inside wallet selection modal#577GABRIELOFGOD wants to merge 2 commits into
Conversation
|
@GABRIELOFGOD Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
📝 WalkthroughWalkthroughThe wallet modal now traps keyboard focus, restores focus to its trigger on close, and exposes improved button semantics. Wallet triggers are marked for focus restoration, with end-to-end tests covering tab navigation and Escape dismissal. ChangesWallet modal accessibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/web/e2e/wallet-connection.spec.ts (1)
87-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftCover focus restoration after a successful connection.
This test closes with Escape before
connect()replaces the disconnected trigger. Add a mocked successful-connect flow that asserts focus lands on the newly mounted connected-wallet trigger after the modal auto-closes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/e2e/wallet-connection.spec.ts` around lines 87 - 106, Extend the wallet connection focus test around the existing Escape scenario to mock a successful connect flow, allowing connect() to replace the disconnected trigger and auto-close the modal. Assert that focus is restored to the newly mounted connected-wallet trigger after the successful connection, rather than only validating the pre-connection Escape behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/test-results/.last-run.json`:
- Around line 1-4: Remove the generated test-results/.last-run.json artifact
from the change, and update the repository ignore configuration to exclude
generated test-result files such as .last-run.json.
---
Nitpick comments:
In `@apps/web/e2e/wallet-connection.spec.ts`:
- Around line 87-106: Extend the wallet connection focus test around the
existing Escape scenario to mock a successful connect flow, allowing connect()
to replace the disconnected trigger and auto-close the modal. Assert that focus
is restored to the newly mounted connected-wallet trigger after the successful
connection, rather than only validating the pre-connection Escape behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9c836ead-b344-47e6-aa92-6e18382050a3
📒 Files selected for processing (4)
apps/web/e2e/wallet-connection.spec.tsapps/web/src/components/organisms/connect-button.tsxapps/web/src/components/organisms/wallet-modal.tsxapps/web/test-results/.last-run.json
|
New commit made |
close #392
close #394
Summary by CodeRabbit
Accessibility
Tests