Skip to content
GraphiCore
Accessibility GraphiCore editorial

A mobile menu built as a panel

A mobile menu panel counts as accessible not by its appearance but by how it behaves with a keyboard.

A yellow pastel composition of soft geometric shapes

A mobile menu looks simple, but it is where accessibility most often breaks. This is not checked with a screenshot but by trying to use it without a mouse.

What the behaviour must do

  • The open button reports its state through aria-expanded and says which element the panel is controlled by.
  • Escape closes the panel.
  • Closing returns focus to the open button.
  • Following a link closes the panel — otherwise it stays on top of the new page.

The theme switch inside the menu

If the panel is the only place where the theme switch is available on mobile, it needs to be marked up as a standalone block with a label rather than hidden behind an unexplained icon.

Checklist

  1. Open it from the keyboard without touching the screen.
  2. Tab through all the items.
  3. Close it with Escape and check that focus has returned to the button.
  • accessibility
  • navigation