File tree 6 files changed +12
-42
lines changed
6 files changed +12
-42
lines changed Original file line number Diff line number Diff line change @@ -127,21 +127,15 @@ return $.widget( "ui.accordion", {
127
127
128
128
// clean up headers
129
129
this . headers
130
- . removeAttr ( "role" )
131
- . removeAttr ( "aria-expanded" )
132
- . removeAttr ( "aria-selected" )
133
- . removeAttr ( "aria-controls" )
134
- . removeAttr ( "tabIndex" )
130
+ . removeAttr ( "role aria-expanded aria-selected aria-controls tabIndex" )
135
131
. removeUniqueId ( ) ;
136
132
137
133
this . _destroyIcons ( ) ;
138
134
139
135
// clean up content panels
140
136
contents = this . headers . next ( )
141
137
. css ( "display" , "" )
142
- . removeAttr ( "role" )
143
- . removeAttr ( "aria-hidden" )
144
- . removeAttr ( "aria-labelledby" )
138
+ . removeAttr ( "role aria-hidden aria-labelledby" )
145
139
. removeUniqueId ( ) ;
146
140
147
141
if ( this . options . heightStyle !== "content" ) {
Original file line number Diff line number Diff line change @@ -253,8 +253,7 @@ $.widget( "ui.button", {
253
253
. removeClass ( "ui-helper-hidden-accessible" ) ;
254
254
this . buttonElement
255
255
. removeClass ( baseClasses + " ui-state-active " + typeClasses )
256
- . removeAttr ( "role" )
257
- . removeAttr ( "aria-pressed" )
256
+ . removeAttr ( "role aria-pressed" )
258
257
. html ( this . buttonElement . find ( ".ui-button-text" ) . html ( ) ) ;
259
258
260
259
if ( ! this . hasTitle ) {
Original file line number Diff line number Diff line change @@ -160,24 +160,17 @@ return $.widget( "ui.menu", {
160
160
161
161
_destroy : function ( ) {
162
162
var items = this . element . find ( ".ui-menu-item" )
163
- . removeAttr ( "role" )
164
- . removeAttr ( "aria-disabled" ) ,
163
+ . removeAttr ( "role aria-disabled" ) ,
165
164
submenus = items . children ( ".ui-menu-item-wrapper" )
166
165
. removeUniqueId ( )
167
- . removeAttr ( "tabIndex" )
168
- . removeAttr ( "role" )
169
- . removeAttr ( "aria-haspopup" ) ;
166
+ . removeAttr ( "tabIndex role aria-haspopup" ) ;
170
167
171
168
// Destroy (sub)menus
172
169
this . element
173
170
. removeAttr ( "aria-activedescendant" )
174
171
. find ( ".ui-menu" ) . addBack ( )
175
- . removeAttr ( "role" )
176
- . removeAttr ( "tabIndex" )
177
- . removeAttr ( "aria-labelledby" )
178
- . removeAttr ( "aria-expanded" )
179
- . removeAttr ( "aria-hidden" )
180
- . removeAttr ( "aria-disabled" )
172
+ . removeAttr ( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
173
+ "tabIndex" )
181
174
. removeUniqueId ( )
182
175
. show ( ) ;
183
176
Original file line number Diff line number Diff line change @@ -69,11 +69,7 @@ return $.widget( "ui.progressbar", {
69
69
} ,
70
70
71
71
_destroy : function ( ) {
72
- this . element
73
- . removeAttr ( "role" )
74
- . removeAttr ( "aria-valuemin" )
75
- . removeAttr ( "aria-valuemax" )
76
- . removeAttr ( "aria-valuenow" ) ;
72
+ this . element . removeAttr ( "role aria-valuemin aria-valuemax aria-valuenow" ) ;
77
73
78
74
this . valueDiv . remove ( ) ;
79
75
} ,
Original file line number Diff line number Diff line change @@ -488,11 +488,7 @@ return $.widget( "ui.spinner", {
488
488
_destroy : function ( ) {
489
489
this . element
490
490
. prop ( "disabled" , false )
491
- . removeAttr ( "autocomplete" )
492
- . removeAttr ( "role" )
493
- . removeAttr ( "aria-valuemin" )
494
- . removeAttr ( "aria-valuemax" )
495
- . removeAttr ( "aria-valuenow" ) ;
491
+ . removeAttr ( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" ) ;
496
492
497
493
this . uiSpinner . replaceWith ( this . element ) ;
498
494
} ,
Original file line number Diff line number Diff line change @@ -729,23 +729,15 @@ return $.widget( "ui.tabs", {
729
729
. unbind ( this . eventNamespace ) ;
730
730
731
731
this . anchors
732
- . removeAttr ( "role" )
733
- . removeAttr ( "tabIndex" )
732
+ . removeAttr ( "role tabIndex" )
734
733
. removeUniqueId ( ) ;
735
734
736
735
this . tabs . add ( this . panels ) . each ( function ( ) {
737
736
if ( $ . data ( this , "ui-tabs-destroy" ) ) {
738
737
$ ( this ) . remove ( ) ;
739
738
} else {
740
- $ ( this )
741
- . removeAttr ( "tabIndex" )
742
- . removeAttr ( "aria-live" )
743
- . removeAttr ( "aria-busy" )
744
- . removeAttr ( "aria-selected" )
745
- . removeAttr ( "aria-labelledby" )
746
- . removeAttr ( "aria-hidden" )
747
- . removeAttr ( "aria-expanded" )
748
- . removeAttr ( "role" ) ;
739
+ $ ( this ) . removeAttr ( "role tabIndex " +
740
+ "aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" ) ;
749
741
}
750
742
} ) ;
751
743
You can’t perform that action at this time.
0 commit comments