This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,6 @@ function MdTabs ($$mdSvgRegistry) {
169
169
'class="md-tab" ' +
170
170
'tabindex="-1" ' +
171
171
'id="tab-item-{{::tab.id}}" ' +
172
- 'role="tab" ' +
173
172
'aria-controls="tab-content-{{::tab.id}}" ' +
174
173
'aria-selected="{{tab.isActive()}}" ' +
175
174
'aria-disabled="{{tab.scope.disabled || \'false\'}}" ' +
Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ describe('<md-tabs>', function () {
354
354
expect ( tabs . find ( 'md-tabs-canvas' ) . attr ( 'role' ) ) . toBe ( 'tablist' ) ;
355
355
356
356
expect ( tabItem . attr ( 'id' ) ) . toBeTruthy ( ) ;
357
- expect ( tabItem . attr ( 'role' ) ) . toBe ( 'tab' ) ;
358
357
expect ( tabItem . attr ( 'aria-controls' ) ) . toBe ( tabContent . attr ( 'id' ) ) ;
359
358
360
359
expect ( tabContent . attr ( 'id' ) ) . toBeTruthy ( ) ;
@@ -364,6 +363,24 @@ describe('<md-tabs>', function () {
364
363
//Unique ids check
365
364
expect ( tabContent . attr ( 'id' ) ) . not . toEqual ( tabItem . attr ( 'id' ) ) ;
366
365
} ) ;
366
+
367
+ it ( 'should not assign role to dummy tabs' , function ( ) {
368
+ var tabs = setup ( '<md-tabs>' +
369
+ '<md-tab label="label!">content!</md-tab>' +
370
+ '</md-tabs>' ) ;
371
+ var tabItem = tabs . find ( 'md-dummy-tab' ) ;
372
+
373
+ expect ( tabItem . attr ( 'role' ) ) . toBeFalsy ( ) ;
374
+ } ) ;
375
+
376
+ it ( 'should assign role to visible tabs' , function ( ) {
377
+ var tabs = setup ( '<md-tabs>' +
378
+ '<md-tab label="label!">content!</md-tab>' +
379
+ '</md-tabs>' ) ;
380
+ var tabItem = tabs . find ( 'md-tab-item' ) ;
381
+
382
+ expect ( tabItem . attr ( 'role' ) ) . toBe ( 'tab' ) ;
383
+ } ) ;
367
384
} ) ;
368
385
369
386
describe ( '<md-tab>' , function ( ) {
You can’t perform that action at this time.
0 commit comments