File tree 2 files changed +26
-0
lines changed
2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -221,4 +221,29 @@ asyncTest( "multiple active delegated tooltips", function() {
221
221
step1 ( ) ;
222
222
} ) ;
223
223
224
+ // http://bugs.jqueryui.com/ticket/11272
225
+ test ( "remove conflicting attributes from live region" , function ( ) {
226
+ expect ( 2 ) ;
227
+
228
+ var element = $ (
229
+ "<div id='content'>" +
230
+ "<input type='radio' name='hobby' id='hobby1' checked='checked'>" +
231
+ "<label for='hobby1'>option 1</label>" +
232
+ "<input type='radio' name='hobby' id='hobby2'>" +
233
+ "<label for='hobby2'>option 2</label>" +
234
+ "</div>" ) ;
235
+
236
+ $ ( "#tooltipped1" )
237
+ . tooltip ( {
238
+ content : element ,
239
+ open : function ( ) {
240
+ equal ( $ ( ".ui-helper-hidden-accessible [name]" ) . length , 0 ,
241
+ "no name attributes within live region" ) ;
242
+ equal ( $ ( ".ui-helper-hidden-accessible [id]" ) . length , 0 ,
243
+ "no id attributes within live region" ) ;
244
+ }
245
+ } )
246
+ . tooltip ( "open" ) ;
247
+ } ) ;
248
+
224
249
} ) ;
Original file line number Diff line number Diff line change @@ -287,6 +287,7 @@ $.widget( "ui.tooltip", {
287
287
// Voiceover will sometimes re-read the entire log region's contents from the beginning
288
288
this . liveRegion . children ( ) . hide ( ) ;
289
289
a11yContent = $ ( "<div>" ) . html ( tooltip . find ( ".ui-tooltip-content" ) . html ( ) ) ;
290
+ a11yContent . removeAttr ( "name" ) . find ( "[name]" ) . removeAttr ( "name" ) ;
290
291
a11yContent . removeAttr ( "id" ) . find ( "[id]" ) . removeAttr ( "id" ) ;
291
292
a11yContent . appendTo ( this . liveRegion ) ;
292
293
You can’t perform that action at this time.
0 commit comments