cloud-gov / cg-ui

for the 2024 18F-supported cloud.gov product UI formerly known as the Stratos Dashboard
Other
4 stars 0 forks source link

Bug: implement more modal a11y features #297

Closed echappen closed 3 months ago

echappen commented 4 months ago

Make our Modal component have a11y parity with USWDS modal guidelines.

issue (non-blocking): I noticed that the modal window does not have a focus trap, so users can unintentionally move focus outside of the modal. It looks like the USWDS examples have a technique we may be able to borrow https://designsystem.digital.gov/components/modal/

Originally posted by @hursey013 in https://github.com/cloud-gov/cg-ui/issues/294#issuecomment-2181560206

Acceptance criteria

echappen commented 4 months ago

Food for thought: https://medium.com/cstech/achieving-focus-trapping-in-a-react-modal-component-3f28f596f35b