flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Frontend] Add focus trapping and accessible names to the remaining ad-hoc modals

Open blurbeast opened this issue 2 weeks ago • 3 comments

Overview & Background

The project has a tested focus-trap hook (useModalDialog, with tests) used by 7 dialogs — but four overlays bypass it: KeyboardShortcutsModal.tsx:33-39 (bare div with onClick={onClose}), WebhookModal.tsx:31 and WebhookDeliveryModal.tsx:12 (role="dialog" aria-modal="true" but no accessible name), and BatchClaimDrawer.tsx:20 (an <aside>, not a dialog — no Escape, no focus trap). Tab is not trapped, focus is not restored on close, and keyboard/screen-reader users can interact with obscured background content.


Technical Specification & Architecture

  1. Route all four through useModalDialog (or extract a shared <Dialog> primitive).
  2. Add aria-labelledby pointing at each modal's heading.

Target Files

  • frontend/src/components/dashboard/KeyboardShortcutsModal.tsx
  • frontend/src/components/webhooks/WebhookModal.tsx
  • frontend/src/components/webhooks/WebhookDeliveryModal.tsx
  • frontend/src/components/dashboard/BatchClaimDrawer.tsx

Acceptance Criteria

  • [ ] Every overlay traps Tab and restores focus on close.
  • [ ] Every aria-modal dialog has an accessible name.
  • [ ] Escape closes each overlay.
  • [ ] Axe tests cover all four components.

blurbeast avatar Nov 18 '26 19:11 blurbeast

@Fury03 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

I can work on this

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Fury03 to this issue.

Fury03 avatar Nov 20 '26 13:11 Fury03

Congratulations, @Fury03! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @Fury03: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 20 '26 13:11 drips-wave[bot]

This issue has been completed by @Fury03 as part of the Stellar Wave Program's 11th Wave 🥳

😎 @Fury03: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 21 '26 14:11 drips-wave[bot]