Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Design mobile navigation and submenus

    Navigation helps people reach a page. On mobile, some links may sit inside a panel. Visitors must still understand how to open it, choose a destination and return to the page without becoming trapped in navigation.

    Go to the method

    Phone and tablet presenting navigation
    AI-generated illustration

    Separate destination and disclosure

    Decide whether each section title opens a page or reveals a list. If both functions matter, expose them as distinct controls. A small arrow beside a link is insufficient if the entire area changes between navigation and disclosure by device.

    Label the trigger Menu or Navigation rather than relying on three lines alone. Match section labels to destination pages. Main navigation need not reproduce a whole catalogue: it can lead to indexes that offer search and filters.

    Choose a simple panel or a real interruption

    The W3C disclosure navigation example distinguishes ordinary links from ARIA application menus. Site navigation generally does not require a menu role and software-menu commands. Keep links and a control communicating expansion state.

    If the page remains usable outside the panel, do not describe it as modal. If the panel covers and blocks all other content, provide a true interruption with closing and focus return. Its visual and assistive-technology behaviour must agree.

    Fictional test case: a button opens a list identified as nav-services. aria-controls="nav-services" must reference that actual identifier, while aria-expanded describes the state currently displayed. These attributes do not implement opening. In the W3C disclosure model, Enter and Space activate the button; Escape closes the list and returns focus to its control. Tab and Shift + Tab retain the usual path through controls and links. Arrow keys are an optional addition and do not replace tabbing.

    Distinguish this from a modal panel: it receives focus when opened, prevents background interaction and keeps tabbing inside until closed. aria-modal="true" does not install these behaviours by itself. A simple non-modal submenu must not trap focus. If a width change hides the active control, provide a visible, logical focus destination. The W3C example is educational guidance: test the implementation with the browser and assistive-technology combinations you actually support.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Disclosure navigation: check each transition
    SituationState or controlObservable result
    Closed listaria-expanded="false"No hidden link in the tab sequence
    Open, non-modal listaria-expanded="true"Links reachable; Tab can leave navigation
    Close with EscapeEscapeFocus returns to the opening button
    Switch to another widtharia-expanded / focusDisplay, state and visible focus remain consistent

    Test state and width changes

    Open a submenu on desktop, narrow the window, then widen it again. Check that styles and states leave no invisible focusable links or ineffective controls. Closed panels must also leave the keyboard sequence.

    Test a long translated label, zoom and an already-scrolled page. Navigation should not permanently obscure the title or block access to content. If background scrolling stops while open, restore normal behaviour after closing and after following a link.

    Example: a section with an overview page

    Educational example: Services opens an overview, while a neighbouring button reveals categories. On mobile, Menu exposes both functions with their labels. Testing opens a category, closes navigation and returns with Back. The useful section remains identifiable without an overlay preventing reading.

    Check a component whose width changes when a side panel opens.

    Synthetic case: a side panel reduces menu space without resizing the window. Test long labels and high zoom. Use CSS when sufficient; if JavaScript must react to size, avoid a correction that causes another size change indefinitely. Observe the component’s available space rather than only the screen width.

    • The menu remains usable within its container and no resize loop blocks the interface.
    • MDN Resize Observer

      API reporting changes in an element’s size independently of window resizing.

    Reference documents

    Content updated on

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Link and submenuThe actions are distinguishableLink name and role, separate opening button and announced submenu state.
    Closed panelIts links do not take focusTab sequence before and after opening
    Width changeThe state remains usableMobile then desktop check
    Return to pageScrolling and focus are coherentPosition and active element

    Frequently asked questions

    Does mobile navigation need role="menu"?

    Ordinary site navigation can retain links inside a navigation region. An application-menu role implies additional interactions and should not be added merely for its name.

    Is opening on hover enough?

    Support keyboard and touch too. Sections should be opened without a mouse and closed without losing the journey.

    Can the trigger disappear after opening?

    Closing must remain obvious and reachable. Keeping a control in the same place may help if its name and state stay coherent.