Răsfoiți Sursa

Merge pull request #135 from ckeditor/t/ckeditor5/1403

Fix: The UI buttons should be marked as toggleable for better assistive technologies support (see ckeditor/ckeditor5#1403).
Aleksander Nowodzinski 6 ani în urmă
părinte
comite
92a2f261cf

+ 2 - 1
packages/ckeditor5-list/src/listui.js

@@ -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.

+ 3 - 0
packages/ckeditor5-list/tests/listui.js

@@ -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', () => {