X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ftabletools%2Fdialogs%2FtableCell.js;h=074ee83b19be3ffb402f7b52c37e8db59542c31d;hp=d25503456279d02af19b2f722bf4ca41532e3d13;hb=059b4c2fef02528bf1af189f7996e80652faddfb;hpb=c6e377a02b54abc07129d72b632763c727476a15 diff --git a/_source/plugins/tabletools/dialogs/tableCell.js b/_source/plugins/tabletools/dialogs/tableCell.js index d255034..074ee83 100644 --- a/_source/plugins/tabletools/dialogs/tableCell.js +++ b/_source/plugins/tabletools/dialogs/tableCell.js @@ -104,6 +104,18 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) widths : [ '71%', '29%' ], labelLayout : 'horizontal', validate : validate[ 'number' ]( langCell.invalidWidth ), + + // Extra labelling of width unit type. + onLoad : function() + { + var widthType = this.getDialog().getContentElement( 'info', 'widthType' ), + labelElement = widthType.getElement(), + inputElement = this.getInputElement(), + ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); + + inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); + }, + setup : function( element ) { var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ), @@ -131,7 +143,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) id : 'widthType', labelLayout : 'horizontal', widths : [ '0%', '100%' ], - label : '', + label : editor.lang.table.widthUnit, + labelStyle: 'display:none', 'default' : 'px', items : [ @@ -160,6 +173,18 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) widths : [ '71%', '29%' ], labelLayout : 'horizontal', validate : validate[ 'number' ]( langCell.invalidHeight ), + + // Extra labelling of height unit type. + onLoad : function() + { + var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ), + labelElement = heightType.getElement(), + inputElement = this.getInputElement(), + ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' ); + + inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) ); + }, + setup : function( element ) { var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ), @@ -181,6 +206,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor ) } }, { + id : 'htmlHeightType', type : 'html', html : langTable.widthPx }