Maxim Mironjuk
-
September 24, 2025
A mobile navigation that only toggles visibility is not enough: without a state model for nested categories, without a focus trap and without scroll lock, the off-canvas menu quickly becomes a dead end for keyboard and screen reader users. This article shows how to build the mobile navigation of a Hyvä theme as a self-contained Alpine component, with a state stack for category levels, x-transition for the slide-in panel, a focus trap, ARIA attributes and performant CSS transform animation instead of layout thrashing.