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 سال پیش
والد
کامیت
0e7d3b5b5c
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 1
      packages/ckeditor5-alignment/src/alignmentui.js
  2. 1 0
      packages/ckeditor5-alignment/tests/alignmentui.js

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

@@ -140,7 +140,8 @@ export default class AlignmentUI extends Plugin {
 			buttonView.set( {
 				label: this.localizedOptionTitles[ option ],
 				icon: icons.get( option ),
-				tooltip: true
+				tooltip: true,
+				isToggleable: true
 			} );
 
 			// 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( 'icon' );
 			expect( button ).to.have.property( 'tooltip', true );
+			expect( button ).to.have.property( 'isToggleable', true );
 		} );
 
 		it( 'has isOn bound to command\'s value', () => {