File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,9 @@ $.widget( "ui.tabs", {
247
247
if ( panel . length ) {
248
248
that . panels = that . panels . add ( panel ) ;
249
249
}
250
- tab . attr ( "aria-controls" , selector . substring ( 1 ) ) ;
250
+ tab
251
+ . data ( "ui-tabs-aria-controls" , tab . attr ( "aria-controls" ) )
252
+ . attr ( "aria-controls" , selector . substring ( 1 ) ) ;
251
253
} ) ;
252
254
} ,
253
255
@@ -488,8 +490,17 @@ $.widget( "ui.tabs", {
488
490
"ui-tabs-panel" ,
489
491
"ui-widget-content" ,
490
492
"ui-corner-bottom"
491
- ] . join ( " " ) )
492
- . removeAttr ( "aria-controls" ) ;
493
+ ] . join ( " " ) ) ;
494
+ }
495
+ } ) ;
496
+
497
+ this . lis . each ( function ( ) {
498
+ var li = $ ( this ) ,
499
+ prev = li . data ( "ui-tabs-aria-controls" ) ;
500
+ if ( prev ) {
501
+ li . attr ( "aria-controls" , prev ) ;
502
+ } else {
503
+ li . removeAttr ( "aria-controls" ) ;
493
504
}
494
505
} ) ;
495
506
You can’t perform that action at this time.
0 commit comments