Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option, focusTrapActive, to allow disabling the focus trap. #103

Closed
wants to merge 1 commit into from
Closed

Conversation

chaddjohnson
Copy link

Per #101, I've added an option to disable the focus trap. Please consider merging this into mainstream. Thanks!

Copy link

@nijynot nijynot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@chaddjohnson
Copy link
Author

@nijynot Thanks. Is there anything else I need to do to get this merged into master?

@resource11
Copy link

Circling back here... One of the key tenets of an accessible modal is trapping focus inside the modal when it is open. I'm concerned that adding this feature in will create a plethora of inaccessible modals out there... :)

Here's a great article on accessible modals by Ire Aderinokun that describes the concept very well.

@marlomgirardi
Copy link
Contributor

One of the project goals is accessibility, as @resource11 said, focus trap in a modal is a must-have.

@chaddjohnson
Copy link
Author

chaddjohnson commented Aug 19, 2021

Circling back here... One of the key tenets of an accessible modal is trapping focus inside the modal when it is open. I'm concerned that adding this feature in will create a plethora of inaccessible modals out there... :)

Here's a great article on accessible modals by Ire Aderinokun that describes the concept very well.

There are valid use cases for disabling focus traps. For example, in my app, a modal is placed inline in a page in design mode (the user is designing a modal). In this case, no interaction with the modal takes place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants