-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Site Editor: the WP admin menu isn't really hidden on small screens #49834
Comments
I wasn't able to fully reproduce this, but only had a time to give a cursory glance. What I found was the #wpadminbar always having display: none across all width breakpoints, even if the code is pretty messy: But in case there's a bug I'm not reproducing, I can confirm there's no need to show the classic adminbar in this view. You can always ping |
@jasmussen looks like you're looking at the wrong place? |
Apologies, long week. Indeed, that's display block even when not visible, that's not great. If I forcefully apply For what it's worth, the adminbar that opens this menu is present only in the post editor, not the site editor, so the whole thing could use an iteration, I'll dive into a mockup for improvements across both next week (see also #49774). But as far as an immediate fix to the issue, it seems like
That doesn't seem ideal to me, and I'm not actually sure the history that got us here. In case you have a better fix, I'd be happy to approve it. |
It might make the most sense to handle this in core by observing when the editor is active; this feels to me like a bug in the admin menu handling, and not something that should be getting handled in the block editor. |
Description
In the Site Editor, the WordPress classic 'admin menu'
#adminmenumain
is hidden withdisplay: none;
.However, on small screens it is not hidden. Only the inner
#adminmenuwrap
element is hidden and that's because of the WP 'auto-fold' feature.Not sure whether there's a reason to not hide the admin menu also on small screens. Cc @jasmussen
This has an impact for accessibility, as:
<nav>
element is perceivable, announced by screen readers, and included in the ARIA landmarks available on the page.Hiding
#adminmenumain
also on small screens would allow to:<nav>
element in Browse mode navigation sidebar.Step-by-step reproduction instructions
#adminmenumain
is hidden withdisplay: none;
.#adminmenumain
is not hidden withdisplay: none;
.Screenshots, screen recording, code snippet
Skip links and main menu
<nav>
not really hidden on small screens:Hidden on desktop:
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: