JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2
[ckeditor.git] / _source / themes / default / theme.js
index 96ff928..ef0f7c9 100644 (file)
@@ -118,15 +118,17 @@ CKEDITOR.themes.add( 'default', (function()
                                        ' dir="', editor.lang.dir, '"' +\r
                                        ' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' +\r
                                        ' lang="', editor.langCode, '"' +\r
-                                       ' tabindex="' + tabIndex + '"' +\r
+                                       ' role="application"' +\r
+                                       ' aria-labelledby="cke_', name, '_arialbl"' +\r
                                        ( style ? ' style="' + style + '"' : '' ) +\r
                                        '>' +\r
-                                       '<span class="' , CKEDITOR.env.cssClass, '">' +\r
-                                               '<span class="cke_wrapper cke_', editor.lang.dir, '">' +\r
-                                                       '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0"><tbody>' +\r
-                                                               '<tr', topHtml          ? '' : ' style="display:none"', '><td id="cke_top_'             , name, '" class="cke_top">'    , topHtml               , '</td></tr>' +\r
-                                                               '<tr', contentsHtml     ? '' : ' style="display:none"', '><td id="cke_contents_', name, '" class="cke_contents" style="height:', height, '">', contentsHtml, '</td></tr>' +\r
-                                                               '<tr', bottomHtml       ? '' : ' style="display:none"', '><td id="cke_bottom_'  , name, '" class="cke_bottom">' , bottomHtml    , '</td></tr>' +\r
+                                       '<span id="cke_', name, '_arialbl" class="cke_voice_label">' + editor.lang.editor + '</span>' +\r
+                                       '<span class="' , CKEDITOR.env.cssClass, '" role="presentation">' +\r
+                                               '<span class="cke_wrapper cke_', editor.lang.dir, '" role="presentation">' +\r
+                                                       '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody>' +\r
+                                                               '<tr', topHtml          ? '' : ' style="display:none"', '><td id="cke_top_'             , name, '" class="cke_top" role="presentation">'        , topHtml               , '</td></tr>' +\r
+                                                               '<tr', contentsHtml     ? '' : ' style="display:none"', '><td id="cke_contents_', name, '" class="cke_contents" style="height:', height, '" role="presentation">', contentsHtml, '</td></tr>' +\r
+                                                               '<tr', bottomHtml       ? '' : ' style="display:none"', '><td id="cke_bottom_'  , name, '" class="cke_bottom" role="presentation">'     , bottomHtml    , '</td></tr>' +\r
                                                        '</tbody></table>' +\r
                                                        //Hide the container when loading skins, later restored by skin css.\r
                                                        '<style>.', editor.skinClass, '{visibility:hidden;}</style>' +\r
@@ -134,8 +136,8 @@ CKEDITOR.themes.add( 'default', (function()
                                        '</span>' +\r
                                '</span>' ].join( '' ) );\r
 \r
-                       container.getChild( [0, 0, 0, 0, 0] ).unselectable();\r
-                       container.getChild( [0, 0, 0, 0, 2] ).unselectable();\r
+                       container.getChild( [1, 0, 0, 0, 0] ).unselectable();\r
+                       container.getChild( [1, 0, 0, 0, 2] ).unselectable();\r
 \r
                        if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE )\r
                                container.insertAfter( element );\r
@@ -167,20 +169,20 @@ CKEDITOR.themes.add( 'default', (function()
                                        '<div class="cke_editor_' + editor.name.replace('.', '\\.') + '_dialog cke_skin_', editor.skinName,\r
                                                '" dir="', editor.lang.dir, '"' +\r
                                                ' lang="', editor.langCode, '"' +\r
+                                               ' role="dialog"' +\r
+                                               ' aria-labelledby="%title#"' +\r
                                                '>' +\r
                                                '<table class="cke_dialog', ' ' + CKEDITOR.env.cssClass,\r
-                                                       ' cke_', editor.lang.dir, '" style="position:absolute">' +\r
-                                                       '<tr><td>' +\r
-                                                       '<div class="%body">' +\r
-                                                               '<div id="%title#" class="%title"></div>' +\r
-                                                               '<div id="%close_button#" class="%close_button">' +\r
-                                                                       '<span>X</span>' +\r
-                                                               '</div>' +\r
-                                                               '<div id="%tabs#" class="%tabs"></div>' +\r
-                                                                 '<table class="%contents"><tr>' +\r
-                                                                 '<td id="%contents#" class="%contents"></td>' +\r
-                                                                 '</tr></table>' +\r
-                                                               '<div id="%footer#" class="%footer"></div>' +\r
+                                                       ' cke_', editor.lang.dir, '" style="position:absolute" role="presentation">' +\r
+                                                       '<tr><td role="presentation">' +\r
+                                                       '<div class="%body" role="presentation">' +\r
+                                                               '<div id="%title#" class="%title" role="presentation"></div>' +\r
+                                                               '<a id="%close_button#" class="%close_button" href="javascript:void(0)" title="' +  editor.lang.common.close+'" role="button"><span class="cke_label">X</span></a>' +\r
+                                                               '<div id="%tabs#" class="%tabs" role="tablist"></div>' +\r
+                                                               '<table class="%contents" role="presentation"><tr>' +\r
+                                                                 '<td id="%contents#" class="%contents" role="presentation"></td>' +\r
+                                                               '</tr></table>' +\r
+                                                               '<div id="%footer#" class="%footer" role="presentation"></div>' +\r
                                                        '</div>' +\r
                                                        '<div id="%tl#" class="%tl"></div>' +\r
                                                        '<div id="%tc#" class="%tc"></div>' +\r
@@ -278,7 +280,7 @@ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, res
 \r
        var container = this.container,\r
                contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ),\r
-               outer = resizeInner ? container.getChild( 0 ) : container;\r
+               outer = resizeInner ? container.getChild( 1 ) : container;\r
 \r
        // Resize the width first.\r
        // WEBKIT BUG: Webkit requires that we put the editor off from display when we\r
@@ -302,7 +304,7 @@ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, res
 \r
 CKEDITOR.editor.prototype.getResizable = function()\r
 {\r
-       return this.container.getChild( 0 );\r
+       return this.container.getChild( 1 );\r
 };\r
 \r
 /**\r