ionic-team / ionic-team/ionic-docs

content: using "aria-labelledby", as suggested by the Accessibility Guidelines, never worked with modals

Offen
#3,809 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
content
Vorherrschende Sprache
MDX
Sterne
621
Forks
3.2k
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
86

Beschreibung

### URL

https://ionic.io/docs/accessibility/ion-modal

### Issue Description

In the Accessibility Guidelines for modals, it says:

> In the above example the logical choice for an accessible name would be the `ion-title` of "Welcome". We can associate the modal with this by setting the `aria-labelled` attribute and giving the `ion-title` an id:

Leaving aside that it should be `aria-labelledby`, this has never worked as the only two attributes that are pushed down to the actual `div` that also gets assigned the `role` attribute of "dialog" are `role` and `aria-label`, as seen here in [the code for modal](https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/modal/modal.tsx#L367).

So either the code needs a fix to support `aria-labelledby`, or the docs need to be adjusted.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.