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 #46 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 authored Aug 12, 2019
2 parents aea609b + 3364aaa commit 7229cdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/paragraphbuttonui.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export default class ParagraphButtonUI extends Plugin {
view.label = t( 'Paragraph' );
view.icon = icon;
view.tooltip = true;
view.isToggleable = true;
view.bind( 'isEnabled' ).to( command );
view.bind( 'isOn' ).to( command, 'value' );

Expand Down
1 change: 1 addition & 0 deletions tests/paragraphbuttonui.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe( 'HeadingButtonUI', () => {
expect( paragraphButton.label ).to.equal( 'Paragraph' );
expect( paragraphButton.icon ).to.equal( icon );
expect( paragraphButton.tooltip ).to.equal( true );
expect( paragraphButton.isToggleable ).to.equal( true );
} );

it( 'should bind button to command', () => {
Expand Down

0 comments on commit 7229cdb

Please sign in to comment.