Skip to content

MatDialogClose shouldn't set aria-label if it has text #11084

Closed
@jelbourn

Description

@jelbourn

In cases where a button has both text and a mat-dialog-close, the aria-label should not be set because it trumps the text. We should only set the label if either: the text is empty, or, the only text is within a mat-icon.

It would make sense to add something like Closes the dialog with aria-describedby (via AriaDescriber) if we add an API to customize the message for i18n.

Metadata

Metadata

Assignees

Labels

AccessibilityThis issue is related to accessibility (a11y)GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions