Skip to content

fix(theme): open primary navigation on mobile when no docs sidebar exists - #13

Open
burakibaoglu0 wants to merge 1 commit into
Automattic:mainfrom
burakibaoglu0:fix/ibaoglu/mobile-primary-nav-drawer
Open

fix(theme): open primary navigation on mobile when no docs sidebar exists#13
burakibaoglu0 wants to merge 1 commit into
Automattic:mainfrom
burakibaoglu0:fix/ibaoglu/mobile-primary-nav-drawer

Conversation

@burakibaoglu0

Copy link
Copy Markdown

The header's mobile drawer toggle only ever controlled #docs-sidebar, which exists solely on the docs page template. On the homepage, posts, archives, search, and 404 pages there is no sidebar to open, so tapping the visible hamburger button did nothing and left the primary navigation (Docs, Why DocsPress?, Kitchen Sink, GitHub) unreachable on mobile.

The toggle now falls back to opening the primary navigation as a slide-in drawer (reusing the docs sidebar's existing mobile treatment) on pages without a docs sidebar, and the shared drawer-scrim close button moved from the docs-sidebar block to the always-present menu toggle so it works on every template. aria-controls is now set dynamically to whichever element the button actually opens.

…ists

The header's mobile drawer toggle only ever controlled #docs-sidebar,
which exists solely on the docs page template. On the homepage, posts,
archives, search, and 404 pages there is no sidebar to open, so tapping
the visible hamburger button did nothing and left the primary
navigation (Docs, Why DocsPress?, Kitchen Sink, GitHub) unreachable on
mobile.

The toggle now falls back to opening the primary navigation as a
slide-in drawer (reusing the docs sidebar's existing mobile treatment)
on pages without a docs sidebar, and the shared drawer-scrim close
button moved from the docs-sidebar block to the always-present menu
toggle so it works on every template. aria-controls is now set
dynamically to whichever element the button actually opens.
@burakibaoglu0
burakibaoglu0 force-pushed the fix/ibaoglu/mobile-primary-nav-drawer branch from 601a70c to bf17c1b Compare July 27, 2026 21:52
@burakibaoglu0 burakibaoglu0 changed the title Fix mobile menu button not opening on non-docs pages fix(theme): open primary navigation on mobile when no docs sidebar exists Jul 27, 2026
@burakibaoglu0

Copy link
Copy Markdown
Author

cc @f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant