Skip to content

cannot add aria label to mat-tab #11893

@literalpie

Description

@literalpie

Bug, feature request, or proposal:

This seems to be a bug

What is the expected behavior?

Adding the aria-labelattribute to the mat-tab element should allow screen-readers to read the label of the element, even if the element has no text.

What is the current behavior?

If there is a mat-tab that has an Icon label, but no text, and you try to put an aria-label on the mat-tab the aria-label is removed from the element.

What are the steps to reproduce?

https://stackblitz.com/edit/aria-in-mat-tabs?file=app/tab-group-custom-label-example.html

What is the use-case or motivation for changing an existing behavior?

a11y

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 6.0.x and material 6.3

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P3An 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