8
0
فهرست منبع

Merge pull request #46 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 سال پیش
والد
کامیت
6cb9e5180c

+ 1 - 0
packages/ckeditor5-paragraph/src/paragraphbuttonui.js

@@ -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' );
 

+ 1 - 0
packages/ckeditor5-paragraph/tests/paragraphbuttonui.js

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