Skip to content

Revert "fix(tabs): Add role to mat-tab-nav-bar and mat-tab-link" #11657

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

Merged
merged 1 commit into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/lib/tabs/tab-nav-bar/tab-nav-bar.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="mat-tab-links" (cdkObserveContent)="_alignInkBar()" role="tablist">
<div class="mat-tab-links" (cdkObserveContent)="_alignInkBar()">
<ng-content></ng-content>
<mat-ink-bar></mat-ink-bar>
</div>

20 changes: 0 additions & 20 deletions src/lib/tabs/tab-nav-bar/tab-nav-bar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('MatTabNavBar', () => {
imports: [MatTabsModule],
declarations: [
SimpleTabNavBarTestApp,
TabLink,
TabLinkWithNgIf,
TabLinkWithTabIndexBinding,
TabLinkWithNativeTabindexAttr,
Expand Down Expand Up @@ -274,16 +273,6 @@ describe('MatTabNavBar', () => {

expect(tabLink.tabIndex).toBe(3, 'Expected the tabIndex to be have been set to 3.');
});

it('should set role on tablist and tab', () => {
const fixture = TestBed.createComponent(TabLink);
fixture.detectChanges();

const tabList = fixture.debugElement.query(By.css('.mat-tab-links'));
expect(tabList.nativeElement.getAttribute('role')).toEqual('tablist');
const tabLinkElement = tabList.query(By.directive(MatTabLink)).nativeElement;
expect(tabLinkElement.getAttribute('role')).toEqual('tab');
});
});

@Component({
Expand Down Expand Up @@ -312,15 +301,6 @@ class SimpleTabNavBarTestApp {
activeIndex = 0;
}

@Component({
template: `
<nav mat-tab-nav-bar>
<a mat-tab-link role="willbeoverridden">Link</a>
</nav>
`
})
class TabLink {}

@Component({
template: `
<nav mat-tab-nav-bar>
Expand Down
1 change: 0 additions & 1 deletion src/lib/tabs/tab-nav-bar/tab-nav-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ export const _MatTabLinkMixinBase =
inputs: ['disabled', 'disableRipple', 'tabIndex'],
host: {
'class': 'mat-tab-link',
'role': 'tab',
'[attr.aria-disabled]': 'disabled.toString()',
'[attr.tabIndex]': 'tabIndex',
'[class.mat-tab-disabled]': 'disabled',
Expand Down