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

Modal: No ability to drop focus #2269

Closed
WillGoldstein opened this issue Dec 11, 2018 · 4 comments
Closed

Modal: No ability to drop focus #2269

WillGoldstein opened this issue Dec 11, 2018 · 4 comments

Comments

@WillGoldstein
Copy link

WillGoldstein commented Dec 11, 2018

It appears there isn't an ability to just drop focus or set noEnforceFocus to false when modal opens. I see plenty of options for focusing on something specific, but we need to be able to just not focus (to prevent bootstrap modal from essentially hijacking the screen).

Use case:

Using swal when a modal is open.

@tmorehouse
Copy link
Member

There is an option to disable enforce focus on modal. Just set the no-enforce-focus prop on b-modal

This prop is also (or should be) reactive, so you can change it dynamically when needed.

Without enforce focus, the model will become in accessible (or difficult to use) for keyboard only and screen reader users. So it would be best to 3nable disable it on demand depending on your situation.

@tmorehouse
Copy link
Member

Hmmm... I see what you are talking about. You are referring to focusing the first element when opens.. although it should just be focusing the modal content wrapper, so that screen readers will announce the content properly, and allow keyboard only users to tab directly into the first control.

@tmorehouse
Copy link
Member

I think this should be fixed in the latest dev branch (as we have altered how he enforce focus works).

Could you try with the latest dev branch?

@tmorehouse tmorehouse changed the title No ability to drop focus Modal: No ability to drop focus Dec 11, 2018
@WillGoldstein
Copy link
Author

Wows, your no-enforce-focus prop definitely did the trick for me. Thank you!

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

No branches or pull requests

2 participants