Daily Accessibility ReviewAppModal dialog missing accessible name (aria-labelledby/aria-label) #17820
Unanswered
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The
AppModalcomponent renders arole="dialog"element without an accessible name. Every dialog must have a label so that screen reader users understand its purpose when focus moves into it.File:
shell/components/AppModal.vue(lines 198–208)The element has
role="dialog"andaria-modal="true", but noaria-labelledbyoraria-labelattribute. Because the component uses a generic<slot>, consumers supply the title — butAppModalprovides no mechanism to automatically connect that title to the dialog element.Real-world impact
PromptRemove.vuewraps an<app-modal>whose visible title is "Are you sure?" inside a<Card>slot:A screen reader user reaching this dialog hears only "dialog" (or nothing), not the title. The same problem affects every other modal in the application that uses
AppModal.WCAG 2.2 references
Recommended fix
Add an
ariaLabelorariaLabelledbyprop toAppModaland bind it to the dialog container:Consumers should then pass the heading's
idvia:aria-labelledby, for example:Beta Was this translation helpful? Give feedback.
All reactions