You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: ion-menu focuses its full-screen host on open and does not restore focus to ion-menu-button on close; ion-menu-button reads aria-label only once #31620
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When an ion-menu is closed with the keyboard (Escape or a close button inside the menu),
the menu blurs the focused element and does not return focus to the ion-menu-button that
opened it. The focus lands on <body>; a keyboard or screen reader user has to start over
from the top of the page. Measured on Android 14 (Chromium WebView) and iOS 26 (WKWebView).
ion-menu-button reads its aria-label once (inheritAttributes on load). When the app
changes the label at runtime (language switch), the button keeps the old name until the
next page is rendered, while ion-menu itself picks up a new aria-label immediately.
Without an app-provided label the button and the menu are announced with the English
defaults ("menu", "Navigation. In menu") regardless of the document language.
When the menu opens, ion-menu moves focus to its own host element (afterAnimation calls this.el.focus() with tabindex="0" set in beforeAnimation). The host has role="navigation" and covers the whole viewport (left/right/top/bottom: 0, backdrop
included), so TalkBack draws its focus frame around the entire screen instead of the visible
menu panel and announces only the landmark name. Measured on Android 14 (Chromium WebView,
TalkBack): after opening, document.activeElement is the ion-menu host.
Verified with the reproduction on Ionic 8.8.5 (Chrome 154, page "2 ion-menu focus"): after closing the menu document.activeElement is <body>; after changing the host aria-label to "Open menu" the inner button still
carries "Menü öffnen".
Expected Behavior
Closing the menu restores focus to the element that opened it, as ion-modal, ion-popover and ion-alert do.
aria-label changes on ion-menu-button are reflected.
Opening the menu focuses the visible menu panel (.menu-inner) or its first focusable
element, so the screen reader focus matches what is visible.
Steps to Reproduce
Closing the menu restores focus to the element that opened it, as ion-modal, ion-popover and ion-alert do.
aria-label changes on ion-menu-button are reflected.
Opening the menu focuses the visible menu panel (.menu-inner) or its first focusable
element, so the screen reader focus matches what is visible.
Activity