mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tabs: Properly remove generated aria-controls attributes on destroy.
This commit is contained in:
parent
240b22b143
commit
fe567eb958
17
ui/jquery.ui.tabs.js
vendored
17
ui/jquery.ui.tabs.js
vendored
@ -247,7 +247,9 @@ $.widget( "ui.tabs", {
|
|||||||
if ( panel.length) {
|
if ( panel.length) {
|
||||||
that.panels = that.panels.add( panel );
|
that.panels = that.panels.add( panel );
|
||||||
}
|
}
|
||||||
tab.attr( "aria-controls", selector.substring( 1 ) );
|
tab
|
||||||
|
.data( "ui-tabs-aria-controls", tab.attr( "aria-controls" ) )
|
||||||
|
.attr( "aria-controls", selector.substring( 1 ) );
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -488,8 +490,17 @@ $.widget( "ui.tabs", {
|
|||||||
"ui-tabs-panel",
|
"ui-tabs-panel",
|
||||||
"ui-widget-content",
|
"ui-widget-content",
|
||||||
"ui-corner-bottom"
|
"ui-corner-bottom"
|
||||||
].join( " " ) )
|
].join( " " ) );
|
||||||
.removeAttr( "aria-controls" );
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.lis.each(function() {
|
||||||
|
var li = $( this ),
|
||||||
|
prev = li.data( "ui-tabs-aria-controls" );
|
||||||
|
if ( prev ) {
|
||||||
|
li.attr( "aria-controls", prev );
|
||||||
|
} else {
|
||||||
|
li.removeAttr( "aria-controls" );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user