daisyui / react-daisyui

daisyUI components built with React 🌼
http://react.daisyui.com/
MIT License
957 stars 103 forks source link

Modal accessibility: Trap focus within modal when open + enable esc and tab key functionality #299

Closed marktlinn closed 1 year ago

marktlinn commented 1 year ago

Currently when a modal is open the focus is not trapped within the modal. This means when hitting the tab key while the modal is open the whole page (behind the modal) is tabbed through.

When open, modals should have all focus fixed within so a user can use the tab key to interact with the modal's content, buttons etc.

Also, user's should be able to use the escape key to close the modal.