This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,6 @@ function MdTabs ($$mdSvgRegistry) {
169169 'class="md-tab" ' +
170170 'tabindex="-1" ' +
171171 'id="tab-item-{{::tab.id}}" ' +
172- 'role="tab" ' +
173172 'aria-controls="tab-content-{{::tab.id}}" ' +
174173 'aria-selected="{{tab.isActive()}}" ' +
175174 'aria-disabled="{{tab.scope.disabled || \'false\'}}" ' +
Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ describe('<md-tabs>', function () {
354354 expect ( tabs . find ( 'md-tabs-canvas' ) . attr ( 'role' ) ) . toBe ( 'tablist' ) ;
355355
356356 expect ( tabItem . attr ( 'id' ) ) . toBeTruthy ( ) ;
357- expect ( tabItem . attr ( 'role' ) ) . toBe ( 'tab' ) ;
358357 expect ( tabItem . attr ( 'aria-controls' ) ) . toBe ( tabContent . attr ( 'id' ) ) ;
359358
360359 expect ( tabContent . attr ( 'id' ) ) . toBeTruthy ( ) ;
@@ -364,6 +363,24 @@ describe('<md-tabs>', function () {
364363 //Unique ids check
365364 expect ( tabContent . attr ( 'id' ) ) . not . toEqual ( tabItem . attr ( 'id' ) ) ;
366365 } ) ;
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+ } ) ;
367384 } ) ;
368385
369386 describe ( '<md-tab>' , function ( ) {
You can’t perform that action at this time.
0 commit comments