Skip to content

Commit

Permalink
fix(tabset): remove unneeded tabpanel role on container
Browse files Browse the repository at this point in the history
Closes #1409
  • Loading branch information
troy authored and pkozlowski-opensource committed Mar 27, 2017
1 parent 493d0b3 commit 5005384
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/tabset/tabset.spec.ts
Expand Up @@ -10,10 +10,6 @@ import {NgbTabset} from './tabset';
const createTestComponent = (html: string) =>
createGenericTestComponent(html, TestComponent) as ComponentFixture<TestComponent>;

function getTabset(nativeEl: HTMLElement) {
return nativeEl.querySelector('ngb-tabset');
}

function getTabTitles(nativeEl: HTMLElement) {
return nativeEl.querySelectorAll('.nav-link');
}
Expand Down Expand Up @@ -93,11 +89,9 @@ describe('ngb-tabset', () => {
`);

const compiled: HTMLElement = fixture.nativeElement;
const tabset = getTabset(compiled);
const tabTitles = getTabTitles(compiled);
const tabContent = getTabContent(compiled);

expect(tabset.getAttribute('role')).toBe('tabpanel');
expect(tabTitles[0].getAttribute('role')).toBe('tab');
expect(tabTitles[0].getAttribute('aria-expanded')).toBe('true');
expect(tabTitles[1].getAttribute('aria-expanded')).toBe('false');
Expand Down
1 change: 0 additions & 1 deletion src/tabset/tabset.ts
Expand Up @@ -78,7 +78,6 @@ export interface NgbTabChangeEvent {
@Component({
selector: 'ngb-tabset',
exportAs: 'ngbTabset',
host: {'role': 'tabpanel'},
template: `
<ul [class]="'nav nav-' + type + ' justify-content-' + justify" role="tablist">
<li class="nav-item" *ngFor="let tab of tabs">
Expand Down

0 comments on commit 5005384

Please sign in to comment.