bug: ion-modal - aria-labelledby on the host does not reach the dialog element
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- accessibility, frontend
Rechercherichtung
Start with ion-modal and its inheritAriaAttributes / htmlAttributes handling, then inspect the dialog element in the shadow root and related accessibility tests. Reproduce with the linked modal example by setting aria-labelledby on the host and inspecting the presented dialog. Done means the dialog receives the label reference and the accessibility tree announces its title.
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
The documentation states that aria-labelledby can be set on ion-modal to name the dialog.
The role="dialog" element lives in the shadow root and only aria-label and role are
forwarded to it (inheritAriaAttributes / htmlAttributes); aria-labelledby set on the host
or via htmlAttributes stays on the host, which has no role, so the dialog is announced
without a name. Naming works only with a literal aria-label, which duplicates the visible
title and is not kept in sync with it.
Verified with the reproduction on Ionic 8.8.5 (Chrome 154, page "4 ion-modal aria-labelledby"): host
aria-labelledby="modal-title", inner [role=dialog] has neither aria-labelledby nor aria-label.
Expected Behavior
The documentation states that aria-labelledby can be set on ion-modal to name the dialog.
The role="dialog" element lives in the shadow root and only aria-label and role are
forwarded to it (inheritAriaAttributes / htmlAttributes); aria-labelledby set on the host
or via htmlAttributes stays on the host, which has no role, so the dialog is announced
without a name. Naming works only with a literal aria-label, which duplicates the visible
title and is not kept in sync with it.
Verified with the reproduction on Ionic 8.8.5 (Chrome 154, page "4 ion-modal aria-labelledby"): host
aria-labelledby="modal-title", inner [role=dialog] has neither aria-labelledby nor aria-label.
Steps to Reproduce
<ion-modal aria-labelledby="t"><ng-template><h2 id="t">Antrag stellen</h2>...</ng-template></ion-modal>- Present the modal and inspect the accessibility tree: the dialog has no name.
Code Reproduction URL
https://stackblitz.com/github/mrambow/starterApp/tree/a11y-repros (page /repro/modal)
GitHub: https://github.com/mrambow/starterApp/tree/a11y-repros (src/app/repros/modal.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
- 3 T. 4 Std.
- Gemergte PRs (30 T.)
- 72
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 9 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 32 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 26 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 67 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
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
remotion-dev/remotion#12905 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
supermomonga/paseo-plugin-zcode-provider#83 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
oxidecomputer/skepsis#102 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
voidzero-dev/void#677 ·
Maintainer antworten meist innerhalb von 1 Tag