8
0
Просмотр исходного кода

Merge pull request #44 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 лет назад
Родитель
Сommit
0e7d3b5b5c

+ 2 - 1
packages/ckeditor5-alignment/src/alignmentui.js

@@ -140,7 +140,8 @@ export default class AlignmentUI extends Plugin {
 			buttonView.set( {
 			buttonView.set( {
 				label: this.localizedOptionTitles[ option ],
 				label: this.localizedOptionTitles[ option ],
 				icon: icons.get( option ),
 				icon: icons.get( option ),
-				tooltip: true
+				tooltip: true,
+				isToggleable: true
 			} );
 			} );
 
 
 			// Bind button model to command.
 			// Bind button model to command.

+ 1 - 0
packages/ckeditor5-alignment/tests/alignmentui.js

@@ -60,6 +60,7 @@ describe( 'Alignment UI', () => {
 			expect( button ).to.have.property( 'label', 'Align left' );
 			expect( button ).to.have.property( 'label', 'Align left' );
 			expect( button ).to.have.property( 'icon' );
 			expect( button ).to.have.property( 'icon' );
 			expect( button ).to.have.property( 'tooltip', true );
 			expect( button ).to.have.property( 'tooltip', true );
+			expect( button ).to.have.property( 'isToggleable', true );
 		} );
 		} );
 
 
 		it( 'has isOn bound to command\'s value', () => {
 		it( 'has isOn bound to command\'s value', () => {