X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Flistblock%2Fplugin.js;h=c505f0eefa158d3d7ba9949d542bfb03e3ecb505;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=8aa58ad81faee844743c7800b9ec9a9ee5182cb6;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/listblock/plugin.js b/_source/plugins/listblock/plugin.js index 8aa58ad..c505f0e 100644 --- a/_source/plugins/listblock/plugin.js +++ b/_source/plugins/listblock/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -36,7 +36,8 @@ CKEDITOR.plugins.add( 'listblock', keys[ 9 ] = 'next'; // TAB keys[ 38 ] = 'prev'; // ARROW-UP keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB - keys[ 32 ] = 'click'; // SPACE + keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE + CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041). this._.pendingHtml = []; this._.items = {}; @@ -96,10 +97,10 @@ CKEDITOR.plugins.add( 'listblock', '' ); @@ -120,11 +121,6 @@ CKEDITOR.plugins.add( 'listblock', { this._.close(); this.element.appendHtml( this._.pendingHtml.join( '' ) ); - - var items = this._.items, - doc = this.element.getDocument(); - for ( var value in items ) - doc.getById( items[ value ] + '_option' ).setAttribute( 'aria-setsize', this._.size ); delete this._.size; this._.pendingHtml = []; @@ -194,15 +190,19 @@ CKEDITOR.plugins.add( 'listblock', item.addClass( 'cke_selected' ); this.element.getDocument().getById( itemId + '_option' ).setAttribute( 'aria-selected', true ); - this.element.setAttribute( 'aria-activedescendant', itemId + '_option' ); - this.onMark && this.onMark( item ); }, unmark : function( value ) { - this.element.getDocument().getById( this._.items[ value ] ).removeClass( 'cke_selected' ); - this.onUnmark && this.onUnmark( this._.items[ value ] ); + var doc = this.element.getDocument(), + itemId = this._.items[ value ], + item = doc.getById( itemId ); + + item.removeClass( 'cke_selected' ); + doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); + + this.onUnmark && this.onUnmark( item ); }, unmarkAll : function() @@ -212,7 +212,10 @@ CKEDITOR.plugins.add( 'listblock', for ( var value in items ) { - doc.getById( items[ value ] ).removeClass( 'cke_selected' ); + var itemId = items[ value ]; + + doc.getById( itemId ).removeClass( 'cke_selected' ); + doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); } this.onUnmark && this.onUnmark();