JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.1
[ckeditor.git] / _source / plugins / panel / plugin.js
index 181fae3..b9e7886 100644 (file)
@@ -227,6 +227,9 @@ CKEDITOR.ui.panel.prototype =
                                this.document.getById( 'cke_' + this.id + '_frame' )\r
                                : this._.holder;\r
 \r
+               // Disable context menu for block panel.\r
+               holder.getParent().getParent().disableContextMenu();\r
+\r
                if ( current )\r
                {\r
                        // Clean up the current block's effects on holder.\r
@@ -244,6 +247,16 @@ CKEDITOR.ui.panel.prototype =
 \r
                this._.onKeyDown = block.onKeyDown && CKEDITOR.tools.bind( block.onKeyDown, block );\r
 \r
+               block.onMark = function( item )\r
+               {\r
+                       holder.setAttribute( 'aria-activedescendant', item.getId() + '_option' );\r
+               };\r
+\r
+               block.onUnmark = function()\r
+               {\r
+                       holder.removeAttribute( 'aria-activedescendant' );\r
+               };\r
+\r
                block.show();\r
 \r
                return block;\r
@@ -278,6 +291,9 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass(
                if ( blockDefinition )\r
                        CKEDITOR.tools.extend( this, blockDefinition );\r
 \r
+               if ( !this.attributes.title )\r
+                       this.attributes.title = this.attributes[ 'aria-label' ];\r
+\r
                this.keys = {};\r
 \r
                this._.focusIndex = -1;\r
@@ -303,6 +319,8 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass(
                        if ( CKEDITOR.env.webkit )\r
                                item.getDocument().getWindow().focus();\r
                        item.focus();\r
+\r
+                       this.onMark && this.onMark( item );\r
                }\r
        },\r
 \r