Changeset 4912
- Timestamp:
- 01/12/10 09:50:39 (3 years ago)
- Location:
- CKEditor/branches/features/aria/_source
- Files:
-
- 2 edited
-
lang/en.js (modified) (1 diff)
-
plugins/wysiwygarea/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/features/aria/_source/lang/en.js
r4908 r4912 33 33 */ 34 34 editorTitle : 'Rich text editor, %1', 35 editorVoiceLabel : 'Press ALT+F10 moves to toolbar, ALT+F11 moves to elementspath bar.', 35 36 36 37 // Toolbar buttons without dialogs. -
CKEditor/branches/features/aria/_source/plugins/wysiwygarea/plugin.js
r4858 r4912 242 242 ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false; 243 243 244 var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name ), 245 frameDescriptiveLabel = editor.lang.editorVoiceLabel; 246 244 247 editor.on( 'editingBlockReady', function() 245 248 { 246 249 var mainElement, 247 fieldset,250 label, 248 251 iframe, 249 252 isLoadingData, … … 260 263 if ( iframe ) 261 264 iframe.remove(); 262 if ( fieldset)263 fieldset.remove();265 if ( label ) 266 label.remove(); 264 267 265 268 frameLoaded = 0; 269 270 // Accessibility label for iframe document. 271 var labelId = editor.name + '_editing_frame_label', 272 descriptionId = editor.name + '_editing_frame_desc'; 273 274 label = CKEDITOR.dom.element.createFromHtml( 275 '<div style="display:none">' + 276 '<span id="' + labelId + '">' + 277 CKEDITOR.tools.htmlEncode( frameLabel ) + 278 '</span>' + 279 '<span id="' + descriptionId + '">' + 280 CKEDITOR.tools.htmlEncode( frameDescriptiveLabel ) + 281 '</span>' + 282 '</div>' 283 , CKEDITOR.document ); 266 284 267 285 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + … … 277 295 ' tabIndex="-1"' + 278 296 ' allowTransparency="true"' + 297 ' role="textbox"' + 298 ' aria-multiline="true"' + 299 ' aria-labelledby="' + labelId + '"' + 300 ' aria-describedby="' + descriptionId + '"' + 279 301 '></iframe>' ); 280 302 … … 295 317 } ); 296 318 297 var accTitle = editor.lang.editorTitle.replace( '%1', editor.name ); 298 299 if ( CKEDITOR.env.gecko ) 300 { 301 // Accessibility attributes for Firefox. 302 mainElement.setAttributes( 303 { 304 role : 'region', 305 title : accTitle 306 } ); 307 iframe.setAttributes( 308 { 309 role : 'region', 310 title : ' ' 311 } ); 312 } 313 else if ( CKEDITOR.env.webkit ) 314 { 315 iframe.setAttribute( 'title', accTitle ); // Safari 4 316 iframe.setAttribute( 'name', accTitle ); // Safari 3 317 } 318 else if ( CKEDITOR.env.ie ) 319 { 320 // Accessibility label for IE. 321 fieldset = CKEDITOR.dom.element.createFromHtml( 322 '<fieldset style="height:100%' + 323 ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? ';position:relative' : '' ) + 324 '">' + 325 '<legend style="display:block;width:0;height:0;overflow:hidden;' + 326 ( CKEDITOR.env.ie && CKEDITOR.env.quirks ? 'position:absolute' : '' ) + 327 '">' + 328 CKEDITOR.tools.htmlEncode( accTitle ) + 329 '</legend>' + 330 '</fieldset>' 331 , CKEDITOR.document ); 332 iframe.appendTo( fieldset ); 333 fieldset.appendTo( mainElement ); 334 } 335 336 if ( !CKEDITOR.env.ie ) 337 mainElement.append( iframe ); 319 mainElement.append( iframe ); 320 label.insertBefore( iframe ); 338 321 }; 339 322
Note: See TracChangeset
for help on using the changeset viewer.
