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
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- accessibility, frontend
Rechercherichtung
The issue identifies ion-menu focus handling and ion-menu-button label updates, but names no Ionic source files or tests. Start by locating those components and their existing accessibility tests, then reproduce the reported open, close, and runtime label changes. Done when focus moves to the visible menu on open, returns to the opener on close, and updated labels are reflected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
- When an
ion-menuis closed with the keyboard (Escape or a close button inside the menu),
the menu blurs the focused element and does not return focus to theion-menu-buttonthat
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-buttonreads itsaria-labelonce (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, whileion-menuitself picks up a newaria-labelimmediately.- 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-menumoves focus to its own host element (afterAnimationcalls
this.el.focus()withtabindex="0"set inbeforeAnimation). 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.activeElementis theion-menuhost.
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-popoverandion-alertdo. aria-labelchanges onion-menu-buttonare 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-popoverandion-alertdo. aria-labelchanges onion-menu-buttonare 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.
Code Reproduction URL
https://stackblitz.com/github/mrambow/starterApp/tree/a11y-repros (page /repro/menu)
GitHub: https://github.com/mrambow/starterApp/tree/a11y-repros (src/app/repros/menu.page.ts)
Code Reproduction URL
https://github.com/mrambow/starterApp/tree/a11y-repros
Ionic Info
Ionic 8.8.5, Angular 17.3, Capacitor 6 (reproduction); found in Ionic 8.8.5, Angular 21, Capacitor 8
Additional Information
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 52.7k
- Forks
- 13.3k
- Ø Merge
- 2 T. 21 Std.
- Gemergte PRs (30 T.)
- 65
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxEvtl. vergeben @sarankumar1325 hat das vor 10 Tagen übernommen. Offenpackage: core type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
ionic-team/ionic-framework#31639 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: vue swipe cancellation throws when the previous page is missingEvtl. vergeben @dandoingdev hat das vor 34 Tagen übernommen. Offenpackage: vue type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ionic-team/ionic-framework#31514 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedEvtl. vergeben @HappyKnuckles hat das vor 28 Tagen übernommen. Offena11y package: core type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
ionic-team/ionic-framework#31492 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletEvtl. vergeben @Benziza hat das vor 69 Tagen übernommen. Offenpackage: react type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ionic-team/ionic-framework#31410 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
package: angular type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
ionic-team/ionic-framework#31291 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ionic-team/ionic-framework
Ähnliche Issues
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
reproduced
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
anomalyco/opencode#61640 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
scope: data grid status: waiting for maintainer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mui/mui-x#24090 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
ai-driven-fuzzing bug Minor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
ai-driven-fuzzing bug claude Minor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
linagora/twake-calendar-frontend#1944 ·
Maintainer antworten meist innerhalb von 1 Tag