Repository navigation
fix(frontend): unify modal focus traps, guard confirmation backdrops, dedupe routes - #1648
Merged
Merged
Conversation
… dedupe routes - ConfirmationModal & WithdrawalConfirmationModal now use the shared useFocusTrap hook, ignore backdrop clicks and Escape while processing, expose dialog/aria-modal/aria-labelledby, and route all copy through t() - Drawer adopts useFocusTrap so focus is restored on both close and unmount - ToastCenter closes on Escape, moves focus into the panel, and stays a non-modal, non-scroll-locking popover - useFocusTrap gains trapTab and lockScroll options (backward compatible) - App.tsx drops duplicate route/ErrorBoundary definitions and wraps the not-found route in RouteErrorBoundary - Remove stale tracked build/test artifacts and extend .gitignore + README - Repair invalid root package.json (duplicate test script + trailing comma) - Add modal, drawer, toast-center and routing smoke tests Closes Junirezz#1620 Closes Junirezz#1621 Closes Junirezz#1629 Closes Junirezz#1564
|
@trinnode 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! 🚀 |
Contributor
Author
|
Grouped these four issues since they all touch the same modal/route surfaces, so one review pass covers them. Notes for review:
The failing checks that remain on this repo (backend, Rust/CodeQL, coverage-threshold, dependency scans, plus a handful of pre-existing frontend test failures) are unrelated to these files — I confirmed they fail on |
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.
Summary
Resolves four frontend accessibility/maintenance issues in one pass.
#1620 — Confirmation modal backdrop + a11y
ConfirmationModalandWithdrawalConfirmationModalnow use the shareduseFocusTraphook instead of ad-hoc focus handling.Escapeare ignored whileisProcessingis true, so a transaction can't be dismissed mid-flight.role="dialog",aria-modal,aria-labelledbyandaria-describedby, and all copy/labels go throught().#1621 — One focus trap for every modal surface
DraweradoptsuseFocusTrap, so focus is restored on close and unmount (previously it could be lost on unmount).ToastCentercloses onEscape, moves focus into the panel on open, and is configured as a non-modal popover (trapTab: false,lockScroll: false) so Tab can still leave it and page scroll is untouched.useFocusTrapgains optionaltrapTab/lockScrolloptions (backward compatible — defaults preserve existing behavior).#1629 — Remove stale tracked artifacts
bundle-stats.html,lint-output*.txt,test-output.txt,test-results.txt,test_output.json,vitest-results*.json).frontend/.gitignoreand documented the generated reports infrontend/README.md.#1564 — Deduplicate route definitions
ErrorBoundaryblock and a duplicate/adminroute inApp.tsx.RouteErrorBoundary routeName="not-found".CI plumbing
package.json(duplicate"test"key + trailing comma) that caused a JSON parse failure and blocked the frontend env-validation/version gates.Test plan
npm run lint— clean for all touched filesnpx vitest runon the new/updated suites — 48 passingSessionExpiryWarning,VaultDashboard,VirtualizedDataTable,ToastContext,optimisticVaultCache,vaultHealthApi,Portfolio,TransactionHistory,network-banner-stack); all were confirmed failing onmainbefore this branch.Closes #1620
Closes #1621
Closes #1629
Closes #1564