-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Offcanvas navbar expand remaining aria-hidden #35577
Comments
May be For instance, collapsed elements don't have the |
@patrickhlauke can you help us on this? |
I'll have a look... |
I think @florianlacreuse is right regarding |
yes, more fundamentally, the offcanvas component doesn't currently deal with (as in clean up after itself) changes in viewport size. a more dramatic problem: open the offcanvas and resize the page while it's open ... you'll end up with the semi-transparent overlay over the page. I'd say for both of these the more robust solution would be to check for when the offcanvas disappears/isn't used anymore, and do a proper graceful handoff (run the code to "close" the offcanvas, to remove the overlay; and then remove the aria-hiddens inside what was the offcanvas) |
ah, looking even at the modal code itself, i see it uses (though the other issue of the overlay remaining there when resizing an open offcanvas page remains...probably worth filing a separate issue for that though) |
did some refactoring... #35589 |
@patrickhlauke Thank you for your feedback and the PR! I agree about the need of offcanvas navbar to deal with viewport size changes, having this behavior built-in would be perfect. |
The separate issue I filed for the overlay behaviour #35594 |
Prerequisites
Describe the issue
Following PR #34273.
An offcanvas navbar with
.navbar-expand-${breakpoint}
can lead to a remainingaria-hidden="true"
, if the offcanvas is closed and the navbar is expanded again. This edge case happen when resizing the window on desktop or rotating an ipad (for instance).Reduced test cases
https://codepen.io/florianlacreuse/pen/wvreVxN
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.1.3
The text was updated successfully, but these errors were encountered: