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
support focus trapping when bs-dropdown is rendered in wormhole #936
Comments
Hello @seemajune, thanks for raising this issue. To be honest I'm not quite sure if I got you right. Are you expecting the focus to be captured inside the dropdown if it's open? What should happen if the focus is on the last item of the dropdown menu and the user clicks the tab key? Currently the next focusable element outside of the dropdown gets the focus and the dropdown is closed. Are you expecting the first element of the dropdown to be focused? If so: is this supported by plain Bootstrap? Best Jeldrik |
If the dropdown is open, the focus should be on the first interactive element (button) inside of the dropdown. The user should be able to tab through the list of interactive elements there-within, press escape to close the dropdown, therefore moving focus back to the element that triggers opening the dropdown. The element within the dropdown never receives keyboard focus at all when in a wormhole. I hope this helps to note that the |
one more thing to note- with the BsModal, I notice that the element inside the wormhole (the modal) receives |
Thanks! |
Thank you for building this component and for your hard work on making these components accessible.
I've noticed something regarding focus trapping of
<BsDropdown>
when the menu hasrenderInPlace={{false}}
, focus trapping is not applied to the menu. I've added it manually but it would be great to have this fixed.In case I am missing something, here is my component markup without the fix:
"ember-bootstrap": "^3.1.0"
I fixed it by using
ember-focus-trapper
and wrapping<FocusTrapper>
around the<ddm.item>
element.Thanks again
The text was updated successfully, but these errors were encountered: