Home / Blog / Are Shopify mega menus usable with a keyboard alone?

Are Shopify mega menus usable with a keyboard alone?

Published 2026-09-27

Very often, no. A large share of Shopify mega menus are built for hover: the dropdown opens on mouseover and nothing in the code responds to a keyboard. The result is that a keyboard user tabs to "Shop", presses Enter, and either jumps straight to a page, gets focus dropped into the page behind the menu, or finds the submenu links unreachable. A usable menu opens on Enter or Space, moves through items with the arrow keys, announces its state, closes on Escape with focus returned, and keeps focus visible throughout.

What keyboard usable actually means

There is a concrete checklist, and a menu either passes it or it does not. Tab reaches the top-level menu item. Enter, Space, or the down arrow opens the submenu instead of navigating away. Up and down arrows move between the items, left and right move between top-level menus, and Tab from the last item moves into the page content rather than trapping the user. Escape closes the open menu and returns focus to the button that opened it. Focus stays visible the whole time, with a 3:1 focus indicator under WCAG 2.2.

The trigger also needs the right semantics. It should be a button with aria-haspopup and aria-expanded, so a screen reader announces "Shop, menu button, collapsed" and then "expanded" when it opens. A link that navigates away when activated is a common Shopify pattern and it fails the checklist: keyboard users can never dwell on it long enough to open the menu. If the top-level item has a destination page, the standard fix is a split pattern, one link to the page and an adjacent button that opens the submenu, or a button that opens on click and a link inside the menu to the overview page.

Where Shopify mega menus fail

The most common failure is the pure CSS hover menu, where the submenu appears on :hover and sometimes :focus-within. The :focus-within version lets a Tab key open the menu, which feels like a fix, but it usually lacks arrow-key support, escape handling, and state announcements, and Tab order can still behave badly when the submenu closes. It is better than hover-only, and still not a working menu.

The second failure is the app-added menu. Merchants install menu apps or page builders that inject their own navigation markup, and those components were built for visual design demos, not keyboard testing. They routinely omit key handlers entirely. The third is the theme customization that adds a mega menu to a theme whose default navigation was keyboard-safe. The default header may have been fine; the custom mega menu section is where the key handlers went missing. Any time someone rebuilds navigation, the keyboard contract has to be rebuilt with it.

The five-minute keyboard test

Put the mouse aside and use only the keyboard, on the live store, before a theme update and after every theme update. Tab from the top of the page into the header. When you reach a menu trigger, press Enter, then Space, then the down arrow, and note which ones open the menu. If none of them do, the menu is hover-only and it fails. If one opens it, press the arrow keys: do they move between items, or does Tab move into the submenu? Press Escape: does the menu close and return focus to the trigger? Tab through to the last submenu item: does focus move sensibly onward, or does it vanish into the page behind the open menu?

Then run the same test with a screen reader if you have one available, even briefly. The dealbreaker to listen for is the trigger's role and state: if the reader announces a plain link with no hint that a menu will open, screen reader users have no reason to expect the submenu exists. Write down exactly which steps failed. That list is the developer's work order.

How to fix a menu that fails

The durable fix is a menu script with key handlers, not more CSS. The pattern: the trigger is a button with aria-haspopup="true" and aria-expanded toggled between true and false. Clicking, Enter, Space, and down arrow open the menu and move focus to the first item. Arrow keys navigate within the menu, Escape closes it and returns focus to the trigger, and Tab out of the last item closes the menu and continues into the page. Only one menu open at a time. This is the well documented menu button pattern, and any front-end developer can implement it against the theme's existing markup.

Fix it in the theme code, not per page. Mega menus are rendered by the header section, so the repair belongs there, and it should cover every menu layout the theme offers, including the mobile drawer, which has its own focus management requirements. If an app owns the menu, the fix may need the app's cooperation or a replacement app, and that is a real cost to weigh against keeping the app. After the fix, repeat the five-minute test on desktop and mobile widths, because responsive breakpoints sometimes swap in a different menu component with different behavior.

The touch problem is the same problem

Hover-only menus fail on touchscreens for the same reason they fail for keyboards: there is no hover. A phone user tapping the trigger may get the submenu, or may get whisked to the top-level page, depending on the implementation. The button-based pattern fixes both audiences at once, since tapping a button opens the menu deterministically. If your analytics show most traffic on mobile, this is not an edge case; it is the majority of shoppers getting a worse menu.

One more thing worth saying plainly: navigation is the first thing many demand-letter testers try with a keyboard. A broken mega menu is a headline finding, not a footnote. Fix it once in the header code, verify it on every theme change, and keep the dated test evidence. That is the whole program.

Find out where your store stands

Get a free accessibility audit