Skip to content

Commit

Permalink
#9368: Fixed ARIA attributes for toolbar buttons state.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredck committed Dec 20, 2012
1 parent eaa08e6 commit d8db6b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/button/plugin.js
Expand Up @@ -292,6 +292,15 @@

if ( element ) {
element.setState( state, 'cke_button' );

state == CKEDITOR.TRISTATE_DISABLED ?
element.setAttribute( 'aria-disabled', true ) :
element.removeAttribute( 'aria-disabled' );

state == CKEDITOR.TRISTATE_ON ?
element.setAttribute( 'aria-pressed', true ) :
element.removeAttribute( 'aria-pressed' );

return true;
} else
return false;
Expand Down
4 changes: 4 additions & 0 deletions plugins/richcombo/plugin.js
Expand Up @@ -359,6 +359,10 @@ CKEDITOR.plugins.add( 'richcombo', {
var el = this.document.getById( 'cke_' + this.id );
el.setState( state, 'cke_combo' );

state == CKEDITOR.TRISTATE_DISABLED ?
el.setAttribute( 'aria-disabled', true ) :
el.removeAttribute( 'aria-disabled' );

this._.state = state;
},

Expand Down

0 comments on commit d8db6b0

Please sign in to comment.