X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fpanel%2Fplugin.js;h=b9e78865c8f5341b0e8420adf1555b8fa54bffb6;hb=refs%2Ftags%2Fv3.2.1;hp=181fae33796fa2973ece54df9d8e2724f3d47040;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/panel/plugin.js b/_source/plugins/panel/plugin.js index 181fae3..b9e7886 100644 --- a/_source/plugins/panel/plugin.js +++ b/_source/plugins/panel/plugin.js @@ -227,6 +227,9 @@ CKEDITOR.ui.panel.prototype = this.document.getById( 'cke_' + this.id + '_frame' ) : this._.holder; + // Disable context menu for block panel. + holder.getParent().getParent().disableContextMenu(); + if ( current ) { // Clean up the current block's effects on holder. @@ -244,6 +247,16 @@ CKEDITOR.ui.panel.prototype = this._.onKeyDown = block.onKeyDown && CKEDITOR.tools.bind( block.onKeyDown, block ); + block.onMark = function( item ) + { + holder.setAttribute( 'aria-activedescendant', item.getId() + '_option' ); + }; + + block.onUnmark = function() + { + holder.removeAttribute( 'aria-activedescendant' ); + }; + block.show(); return block; @@ -278,6 +291,9 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass( if ( blockDefinition ) CKEDITOR.tools.extend( this, blockDefinition ); + if ( !this.attributes.title ) + this.attributes.title = this.attributes[ 'aria-label' ]; + this.keys = {}; this._.focusIndex = -1; @@ -303,6 +319,8 @@ CKEDITOR.ui.panel.block = CKEDITOR.tools.createClass( if ( CKEDITOR.env.webkit ) item.getDocument().getWindow().focus(); item.focus(); + + this.onMark && this.onMark( item ); } },