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
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- accessibility, frontend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 52.7k
- Forks
- 13.3k
- Merge médio
- 2d 21h
- PRs com merge (30d)
- 65
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxTalvez já em andamento @sarankumar1325 assumiu há 10 dias. Abertapackage: core type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
ionic-team/ionic-framework#31639 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: vue swipe cancellation throws when the previous page is missingTalvez já em andamento @dandoingdev assumiu há 33 dias. Abertapackage: vue type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ionic-team/ionic-framework#31514 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedTalvez já em andamento @HappyKnuckles assumiu há 27 dias. Abertaa11y package: core type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
ionic-team/ionic-framework#31492 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletTalvez já em andamento @Benziza assumiu há 68 dias. Abertapackage: react type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ionic-team/ionic-framework#31410 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
package: angular type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
ionic-team/ionic-framework#31291 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ionic-team/ionic-framework
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
formbricks/formbricks#9918 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
thecodacus/pithagoras#364 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
openclimatefix/quartz-frontend#823 ·
Mantenedores costumam responder em até 4 dias
-
area:agent-manager community needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia
-
`contacts.create` posts to `/audiences/undefined/contacts` when `audienceId` is undefinedTalvez já em andamento @RaphaelFakhri assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
resend/resend-node#1176 ·
Mantenedores costumam responder em até 1 dia