Changeset 4911
- Timestamp:
- 01/12/10 06:48:12 (3 years ago)
- Location:
- CKEditor/branches/features/aria/_source/plugins
- Files:
-
- 5 edited
-
dialog/plugin.js (modified) (3 diffs)
-
dialogui/plugin.js (modified) (7 diffs)
-
flash/dialogs/flash.js (modified) (1 diff)
-
image/dialogs/image.js (modified) (1 diff)
-
link/dialogs/link.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js
r4909 r4911 146 146 }); 147 147 148 this.parts.tabs.setAttribute( 'role', 'tablist' ); 148 149 // Call the CKEDITOR.event constructor to initialize this instance. 149 150 CKEDITOR.event.call( this ); … … 811 812 // Create the HTML for the tab and the content block. 812 813 var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) ); 813 var tab = CKEDITOR.dom.element.createFromHtml( [ 814 page.setAttribute( 'role', 'tabpanel' ); 815 816 var tabId = contents.id + '_' + CKEDITOR.tools.getNextNumber(), 817 tab = CKEDITOR.dom.element.createFromHtml( [ 814 818 '<a class="cke_dialog_tab"', 815 819 ( this._.pageCount > 0 ? ' cke_last' : 'cke_first' ), 816 820 titleHtml, 817 821 ( !!contents.hidden ? ' style="display:none"' : '' ), 818 ' id="', contents.id + '_', CKEDITOR.tools.getNextNumber(), '"' +822 ' id="', tabId, '"' + 819 823 ' href="javascript:void(0)"', 820 ' hidefocus="true">', 824 ' hidefocus="true"' + 825 ' role="tab">', 821 826 contents.label, 822 827 '</a>' 823 828 ].join( '' ) ); 829 830 page.setAttribute( 'aria-labelledby', tabId ); 824 831 825 832 // If only a single page exist, a different style is used in the central pane. … … 881 888 page.hide(); 882 889 } 890 page.setAttribute( 'aria-hidden', i != id ); 883 891 } 884 892 -
CKEditor/branches/features/aria/_source/plugins/dialogui/plugin.js
r4909 r4911 14 14 this._ || ( this._ = {} ); 15 15 this._['default'] = this._.initValue = elementDefinition['default'] || ''; 16 this._.required = elementDefinition[ 'required' ] || false; 16 17 var args = [ this._ ]; 17 18 for ( var i = 1 ; i < arguments.length ; i++ ) … … 245 246 246 247 attributes[ 'aria-labelledby' ] = this._.labelId; 248 this._.required && ( attributes[ 'aria-required' ] = this._.required ); 247 249 for ( var i in attributes ) 248 250 html.push( i + '="' + attributes[i] + '" ' ); … … 293 295 var innerHTML = function() 294 296 { 297 attributes[ 'aria-labelledby' ] = this._.labelId; 298 this._.required && ( attributes[ 'aria-required' ] = this._.required ); 295 299 var html = [ '<div class="cke_dialog_ui_input_textarea"><textarea class="cke_dialog_ui_input_textarea" id="', domId, '" ' ]; 296 300 for ( var i in attributes ) … … 397 401 title = item[2] !== undefined ? item[2] : item[0], 398 402 value = item[1] !== undefined ? item[1] : item[0], 403 inputId = CKEDITOR.tools.getNextNumber() + '_radio_input', 404 labelId = inputId + '_label', 399 405 inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, 400 406 { 401 id : CKEDITOR.tools.getNextNumber() + '_radio_input',407 id : inputId, 402 408 title : null, 403 409 type : null … … 405 411 labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, 406 412 { 407 id : null,408 413 title : title 409 414 }, true ), … … 413 418 'class' : 'cke_dialog_ui_radio_input', 414 419 name : commonName, 415 value : value 420 value : value, 421 'aria-labelledby' : labelId 416 422 }, 417 423 inputHtml = []; … … 422 428 children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); 423 429 inputHtml.push( ' ' ); 424 new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { 'for' : inputAttributes.id },430 new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id }, 425 431 item[0] ); 426 432 inputHtmlList.push( inputHtml.join( '' ) ); -
CKEditor/branches/features/aria/_source/plugins/flash/dialogs/flash.js
r4858 r4911 314 314 type : 'text', 315 315 label : '', 316 required : true, 316 317 validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ), 317 318 setup : loadValue, -
CKEditor/branches/features/aria/_source/plugins/image/dialogs/image.js
r4869 r4911 474 474 type : 'text', 475 475 label : '', 476 required: true, 476 477 onChange : function() 477 478 { -
CKEditor/branches/features/aria/_source/plugins/link/dialogs/link.js
r4858 r4911 426 426 id : 'url', 427 427 label : editor.lang.common.url, 428 required: true, 428 429 onLoad : function () 429 430 {
Note: See TracChangeset
for help on using the changeset viewer.
