-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tabs): update mat-tab-link to set aria-current when active #11409
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
Conversation
LGTM. The tab-link should have role (#11410) and |
Thank you! Rebased and ready for further review. |
83043a0
to
60b8888
Compare
Updated from aria-selected to aria-current per discussion on #11410. nav > link pattern should use aria-current to indicate the current active nav link. |
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.
LGTM
Per offline discussion, Angular Material is not interested in this fix for now pending further analysis. Users are expected to implement their own indicator on which of the mat-tab-link is active. A good candidate seems to be https://www.w3.org/TR/wai-aria-1.1/#aria-current. |
Reopening since it looks like this is the way we want to go. |
mat-tab-group and mat-tab use tablist and tab and sets aria-selected properly https://material.angular.io/components/tabs/overview. mat-tab-nav-bar and mat-tab-link use nav and link roles and are missing corresponding aria-current.
mat-tab-group and mat-tab use tablist and tab and sets aria-selected properly https://material.angular.io/components/tabs/overview. mat-tab-nav-bar and mat-tab-link use nav and link roles and are missing corresponding aria-current.
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. |
mat-tab-header already does this:
https://github.com/angular/material2/blob/abc3d38c57146443c848d5ba26fd2fab8ca185d6/src/lib/tabs/tab-group.html#L11
And you can see aria-selected is being set properly on the main tabs demo page
https://material.angular.io/components/tabs/overview.
But mat-tab-nav-bar (on the same page, but no live demo) doesn't set aria-selected at all.