-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Off-canvas example: content still focusable when off-canvas menu collapsed #25441
Labels
Comments
My bad 😬 |
sorry, that last sentence was a bit harsh... |
#25524 fixed the issue when the navbar is closed. probably when the navbar is open, the main content of the page should not be focusable as it's behind the open menu (acting like a modal, in effect)...but as this is just a simple example (which, incidentally, fails in IE11) we can probably live with that for now... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On small screen sizes, when the top navigation turns to off-canvas, the links/controls inside it are still keyboard-focusable despite not being visible
https://getbootstrap.com/docs/4.0/examples/offcanvas/
Normally we'd add
display:none
when the menu is closed, but flipping betweendisplay:none
anddisplay:block
here kills the animation.If
inert
attribute was well supported cross-browser, that would be an approach...but it's a bit early for that (perhaps using polyfill?).But in short: currently this is a classic example of what not to do, accessibility-wise.
The text was updated successfully, but these errors were encountered: