Skip to content
Permalink
Browse files

Merge branch 't/11044'

  • Loading branch information...
mlewand committed Dec 4, 2013
2 parents d555b5e + caac891 commit 16b11f44b76dfd3b82649e42168500ef84d0c1fe
Showing with 14 additions and 5 deletions.
  1. +1 −0 CHANGES.md
  2. +2 −1 plugins/language/plugin.js
  3. +11 −4 plugins/menu/plugin.js
@@ -9,6 +9,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced aria support for language plugin drop-down menu.
* [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menubutton focused, pressing down arrow key will now open menu and focus its first option.
* [#11165](http://dev.ckeditor.com/ticket/11165): The filebrowser plugin cannot be removed from the editor.
* [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method.
@@ -62,7 +62,8 @@
ltr: ( '' + parts[ 2 ] ).toLowerCase() != 'rtl',
onClick: function() {
editor.execCommand( 'language', this.langId );
}
},
role: 'menuitemcheckbox'
};

// Init style property.
@@ -87,9 +87,10 @@ CKEDITOR.plugins.add( 'menu', {
' tabindex="-1"' +
'_cke_focus=1' +
' hidefocus="true"' +
' role="menuitem"' +
' role="{role}"' +
' aria-haspopup="{hasPopup}"' +
' aria-disabled="{disabled}"';
' aria-disabled="{disabled}"' +
' {ariaChecked}';

// Some browsers don't cancel key events in the keydown but in the
// keypress.
@@ -460,10 +461,14 @@ CKEDITOR.plugins.add( 'menu', {
proto: {
render: function( menu, index, output ) {
var id = menu.id + String( index ),
state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state;
state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state,
ariaChecked = '';

var stateName = state == CKEDITOR.TRISTATE_ON ? 'on' : state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' : 'off';

if ( this.role in { menuitemcheckbox: 1, menuitemradio: 1 } )
ariaChecked = ' aria-checked="' + ( state == CKEDITOR.TRISTATE_ON ? 'true' : 'false' ) + '"';

var hasSubMenu = this.getItems;
// ltr: BLACK LEFT-POINTING POINTER
// rtl: BLACK RIGHT-POINTING POINTER
@@ -489,7 +494,9 @@ CKEDITOR.plugins.add( 'menu', {
clickFn: menu._.itemClickFn,
index: index,
iconStyle: CKEDITOR.skin.getIconStyle( iconName, ( this.editor.lang.dir == 'rtl' ), iconName == this.icon ? null : this.icon, this.iconOffset ),
arrowHtml: hasSubMenu ? menuArrowTpl.output({ label: arrowLabel } ) : ''
arrowHtml: hasSubMenu ? menuArrowTpl.output( { label : arrowLabel } ) : '',
role: this.role ? this.role : 'menuitem',
ariaChecked: ariaChecked
};

menuItemTpl.output( params, output );

0 comments on commit 16b11f4

Please sign in to comment.
You can’t perform that action at this time.