laravel / jetstream

Tailwind scaffolding for the Laravel framework.
https://jetstream.laravel.com
MIT License
3.95k stars 808 forks source link

Modals Accessibility Issue #279

Closed octoper closed 3 years ago

octoper commented 3 years ago

Description:

When you open a modal, an overlay added and the focus moves to the input as expected. But the focus doesn't trapped inside the modal or closes the modal when the focus is over the last element in it when tabbing, it's just moves to the next element on the whole page but the modal is still open. This is not accessible to a lot of users not even those with real accessibility problems.

Steps To Reproduce:

Just open a modal and click Tab and after the last element the focus moves outside the modal without even closing it.

driesvints commented 3 years ago

Feel free to send in a pr. Thanks