Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #303 from ckeditor/t/ckeditor5/1403
Browse files Browse the repository at this point in the history
Fix: The UI buttons should be marked as toggleable for better assistive technologies support (see ckeditor/ckeditor5#1403).
  • Loading branch information
oleq committed Aug 12, 2019
2 parents fa6b240 + 221a496 commit 6c74d59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imagestyle/imagestyleui.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export default class ImageStyleUI extends Plugin {
view.set( {
label: style.title,
icon: style.icon,
tooltip: true
tooltip: true,
isToggleable: true
} );

view.bind( 'isEnabled' ).to( command, 'isEnabled' );
Expand Down
1 change: 1 addition & 0 deletions tests/imagestyle/imagestyleui.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe( 'ImageStyleUI', () => {
expect( buttonView ).to.be.instanceOf( ButtonView );
expect( buttonView.label ).to.equal( style.title );
expect( buttonView.icon ).to.equal( style.icon );
expect( buttonView.isToggleable ).to.be.true;

command.isEnabled = true;
expect( buttonView.isEnabled ).to.be.true;
Expand Down

0 comments on commit 6c74d59

Please sign in to comment.