-
Notifications
You must be signed in to change notification settings - Fork 211
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
Better handling of keyboard navigation to be "accessible"? #26
Comments
Thanks for the comment and thoughts, Patrick. The modal is focused when opening it. Please see this line and the I tried to focus back on the main page when the modal is closed here. I might have to look into restoring the original focus state on the actual element instead of the body element which happens in Chrome. An update for the cycling should definitely be implemented. |
Ping @patrickhlauke. Would be awesome if you could throw some links at me :) I'd love to include it in the next version. |
When tabbing through the modal the focus remains within the modal and re-starts at the beginning when it reaches the last tabbable element within the modal. Closes #26.
More insights into this technique: http:https://drublic.de/blog/accessible-dialogs-modals/ Reference #26.
When tabbing through the modal the focus remains within the modal and re-starts at the beginning when it reaches the last tabbable element within the modal. Closes #26.
More insights into this technique: http:https://drublic.de/blog/accessible-dialogs-modals/ Reference #26.
As the term "accessible" is being used here, it's worth noting that ideally the modal should handle keyboard navigation a bit better - if it acts as a true modal, users that navigate via keyboard should, after opening the modal, only be able to tab/shift+tab through the links/elements of the modal itself until it's closed. this will require some additional JS to set initial focus into the modal, make sure that focus stays/cycles within the modal itself, and is returned back to the main page after the modal is closed.
The text was updated successfully, but these errors were encountered: