JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2
[ckeditor.git] / _source / plugins / tabletools / dialogs / tableCell.js
index d255034..074ee83 100644 (file)
@@ -104,6 +104,18 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                                                                                                        widths : [ '71%', '29%' ],\r
                                                                                                        labelLayout : 'horizontal',\r
                                                                                                        validate : validate[ 'number' ]( langCell.invalidWidth ),\r
+\r
+                                                                                                       // Extra labelling of width unit type.\r
+                                                                                                       onLoad : function()\r
+                                                                                                       {\r
+                                                                                                               var widthType = this.getDialog().getContentElement( 'info', 'widthType' ),\r
+                                                                                                                       labelElement = widthType.getElement(),\r
+                                                                                                                       inputElement = this.getInputElement(),\r
+                                                                                                                       ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );\r
+\r
+                                                                                                               inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );\r
+                                                                                                       },\r
+\r
                                                                                                        setup : function( element )\r
                                                                                                        {\r
                                                                                                                var widthAttr = parseInt( element.getAttribute( 'width' ), 10 ),\r
@@ -131,7 +143,8 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                                                                                                        id : 'widthType',\r
                                                                                                        labelLayout : 'horizontal',\r
                                                                                                        widths : [ '0%', '100%' ],\r
-                                                                                                       label : '',\r
+                                                                                                       label : editor.lang.table.widthUnit,\r
+                                                                                                       labelStyle: 'display:none',\r
                                                                                                        'default' : 'px',\r
                                                                                                        items :\r
                                                                                                        [\r
@@ -160,6 +173,18 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                                                                                                        widths : [ '71%', '29%' ],\r
                                                                                                        labelLayout : 'horizontal',\r
                                                                                                        validate : validate[ 'number' ]( langCell.invalidHeight ),\r
+\r
+                                                                                                       // Extra labelling of height unit type.\r
+                                                                                                       onLoad : function()\r
+                                                                                                       {\r
+                                                                                                               var heightType = this.getDialog().getContentElement( 'info', 'htmlHeightType' ),\r
+                                                                                                                       labelElement = heightType.getElement(),\r
+                                                                                                                       inputElement = this.getInputElement(),\r
+                                                                                                                       ariaLabelledByAttr = inputElement.getAttribute( 'aria-labelledby' );\r
+\r
+                                                                                                               inputElement.setAttribute( 'aria-labelledby', [ ariaLabelledByAttr, labelElement.$.id ].join( ' ' ) );\r
+                                                                                                       },\r
+\r
                                                                                                        setup : function( element )\r
                                                                                                        {\r
                                                                                                                var heightAttr = parseInt( element.getAttribute( 'height' ), 10 ),\r
@@ -181,6 +206,7 @@ CKEDITOR.dialog.add( 'cellProperties', function( editor )
                                                                                                        }\r
                                                                                                },\r
                                                                                                {\r
+                                                                                                       id : 'htmlHeightType',\r
                                                                                                        type : 'html',\r
                                                                                                        html : langTable.widthPx\r
                                                                                                }\r