Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Minor docs and tests improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Aug 12, 2019
1 parent 232ee3d commit d7b20b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/button/button.jsdoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
*/

/**
* Controls whether the button view is recognized as toggle button for assistive technologies.
* Controls whether the button view is a toggle button (two–state) for assistive technologies.
*
* @observable
* @default false
Expand Down
11 changes: 2 additions & 9 deletions src/button/switchbuttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export default class SwitchButtonView extends ButtonView {
constructor( locale ) {
super( locale );

this.isToggleable = true;

/**
* The toggle switch of the button.
*
Expand All @@ -43,15 +45,6 @@ export default class SwitchButtonView extends ButtonView {
*/
this.toggleSwitchView = this._createToggleView();

/**
* Controls whether the button view is recognized as toggle button for assistive technologies.
*
* @observable
* @default true
* @member {Boolean} #isToggleable
*/
this.isToggleable = true;

this.extendTemplate( {
attributes: {
class: 'ck-switchbutton'
Expand Down
2 changes: 1 addition & 1 deletion tests/button/buttonview.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe( 'ButtonView', () => {
expect( view.element.attributes[ 'aria-pressed' ].value ).to.equal( 'false' );
} );

it( '-pressed is not present for not toggleable button', () => {
it( '-pressed is not present for non–toggleable button', () => {
view.isOn = true;
expect( view.element.hasAttribute( 'aria-pressed' ) ).to.be.false;

Expand Down

0 comments on commit d7b20b8

Please sign in to comment.