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 #135 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 a792961 + 3121cea commit bb12325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/listui.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export default class ListUI extends Plugin {
buttonView.set( {
label,
icon,
tooltip: true
tooltip: true,
isToggleable: true
} );

// Bind button model to command.
Expand Down
3 changes: 3 additions & 0 deletions tests/listui.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ describe( 'ListUI', () => {

it( 'should set up buttons for bulleted list and numbered list', () => {
expect( bulletedListButton ).to.be.instanceOf( ButtonView );
expect( bulletedListButton.isToggleable ).to.be.true;

expect( numberedListButton ).to.be.instanceOf( ButtonView );
expect( numberedListButton.isToggleable ).to.be.true;
} );

it( 'should execute proper commands when buttons are used', () => {
Expand Down

0 comments on commit bb12325

Please sign in to comment.