Difficulty: Intermediate
Type: UI/UX, accessibility
Background
The application heavily utilizes popup modals for confirmations, settings, and token selections. These were built quickly using basic absolute positioning.
Problem
The current modals trap visual focus but lack proper ARIA attributes, meaning screen readers cannot properly announce the modal's presence, title, or purpose to visually impaired users.
Expected outcome
All primary modals are updated to strictly adhere to W3C WAI-ARIA authoring practices for Dialog (Modal) widgets.
Suggested implementation
- Add
role="dialog" and aria-modal="true" to the modal wrappers.
- Ensure the modal container includes
aria-labelledby pointing to the modal's title ID, and aria-describedby pointing to its body ID.
- Verify that focus is actively trapped within the modal while open, and restored to the trigger element when closed.
Acceptance criteria
Likely affected files/directories
src/components/UI/Modal.tsx
Requirements
- Consider migrating to
@radix-ui/react-dialog primitives if the custom implementation is too brittle.
Difficulty: Intermediate
Type: UI/UX, accessibility
Background
The application heavily utilizes popup modals for confirmations, settings, and token selections. These were built quickly using basic absolute positioning.
Problem
The current modals trap visual focus but lack proper ARIA attributes, meaning screen readers cannot properly announce the modal's presence, title, or purpose to visually impaired users.
Expected outcome
All primary modals are updated to strictly adhere to W3C WAI-ARIA authoring practices for Dialog (Modal) widgets.
Suggested implementation
role="dialog"andaria-modal="true"to the modal wrappers.aria-labelledbypointing to the modal's title ID, andaria-describedbypointing to its body ID.Acceptance criteria
Tabkey.Escapereliably closes the modal.Likely affected files/directories
src/components/UI/Modal.tsxRequirements
@radix-ui/react-dialogprimitives if the custom implementation is too brittle.