-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(material/tabs): allow for tablist aria-label and aria-labelledby to be set #29562
Conversation
…to be set According to the [W3C reference implementation](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/), the inner `tablist` can be labelled using `aria-label` or `aria-labelledby`. These changes add an input to allow them to be set. Fixes angular#29486.
@@ -242,6 +242,12 @@ export class MatTabGroup implements AfterContentInit, AfterContentChecked, OnDes | |||
|
|||
private _backgroundColor: ThemePalette; | |||
|
|||
/** Aria label of the inner `tablist` of the group. */ | |||
@Input('aria-label') ariaLabel: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit on the fence if this should be aria-label
or something like tabListAriaLabel
. I went with the shorter one, because the mat-tab-group
doesn't have a role
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also seems some of out other components (like autocomplete) follow the same too with just calling the input ariaLabel
@@ -242,6 +242,12 @@ export class MatTabGroup implements AfterContentInit, AfterContentChecked, OnDes | |||
|
|||
private _backgroundColor: ThemePalette; | |||
|
|||
/** Aria label of the inner `tablist` of the group. */ | |||
@Input('aria-label') ariaLabel: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also seems some of out other components (like autocomplete) follow the same too with just calling the input ariaLabel
…to be set (#29562) According to the [W3C reference implementation](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/), the inner `tablist` can be labelled using `aria-label` or `aria-labelledby`. These changes add an input to allow them to be set. Fixes #29486. (cherry picked from commit 1968cc4)
…to be set (#29562) According to the [W3C reference implementation](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/), the inner `tablist` can be labelled using `aria-label` or `aria-labelledby`. These changes add an input to allow them to be set. Fixes #29486. (cherry picked from commit 1968cc4)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
According to the W3C reference implementation, the inner
tablist
can be labelled usingaria-label
oraria-labelledby
. These changes add an input to allow them to be set.Fixes #29486.