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

Commit 2288bf3

Browse files
committed
Other: Renamed a misspelled InputTextViewariaDesribedById property to InputTextView#ariaDescribedById. Closes #483.
BREAKING CHANGE: The `InputTextView#ariaDesribedById` property is no longer available. Use `ariaDescribedById` instead.
1 parent b2dcebe commit 2288bf3

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/inputtext/inputtextview.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export default class InputTextView extends View {
6868
* some error, it helps screen readers read the error text.
6969
*
7070
* @observable
71-
* @member {Boolean} #ariaDesribedById
71+
* @member {Boolean} #ariaDescribedById
7272
*/
73-
this.set( 'ariaDesribedById' );
73+
this.set( 'ariaDescribedById' );
7474

7575
const bind = this.bindTemplate;
7676

@@ -88,7 +88,7 @@ export default class InputTextView extends View {
8888
placeholder: bind.to( 'placeholder' ),
8989
readonly: bind.to( 'isReadOnly' ),
9090
'aria-invalid': bind.if( 'hasError', true ),
91-
'aria-describedby': bind.to( 'ariaDesribedById' )
91+
'aria-describedby': bind.to( 'ariaDescribedById' )
9292
},
9393
on: {
9494
input: bind.to( 'input' )

src/labeledinput/labeledinputview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default class LabeledInputView extends View {
175175
const inputView = new InputView( this.locale, statusUid );
176176

177177
inputView.id = inputUid;
178-
inputView.ariaDesribedById = statusUid;
178+
inputView.ariaDescribedById = statusUid;
179179
inputView.bind( 'value' ).to( this );
180180
inputView.bind( 'isReadOnly' ).to( this );
181181
inputView.bind( 'hasError' ).to( this, 'errorText', value => !!value );

tests/inputtext/inputtextview.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import InputTextView from '../../src/inputtext/inputtextview';
99

1010
describe( 'InputTextView', () => {
11-
let view, ariaDesribedById;
11+
let view, ariaDescribedById;
1212

1313
beforeEach( () => {
14-
ariaDesribedById = 'ck-error-1234567890';
14+
ariaDescribedById = 'ck-error-1234567890';
1515
view = new InputTextView();
1616

1717
view.render();
@@ -126,9 +126,9 @@ describe( 'InputTextView', () => {
126126
it( 'should react on view#hasError', () => {
127127
expect( view.element.getAttribute( 'aria-describedby' ) ).to.be.null;
128128

129-
view.ariaDesribedById = ariaDesribedById;
129+
view.ariaDescribedById = ariaDescribedById;
130130

131-
expect( view.element.getAttribute( 'aria-describedby' ) ).to.equal( ariaDesribedById );
131+
expect( view.element.getAttribute( 'aria-describedby' ) ).to.equal( ariaDescribedById );
132132
} );
133133
} );
134134

tests/labeledinput/labeledinputview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe( 'LabeledInputView', () => {
5353
} );
5454

5555
it( 'should pair #inputView and #statusView by unique id', () => {
56-
expect( view.inputView.ariaDesribedById ).to.equal( view.statusView.element.id );
56+
expect( view.inputView.ariaDescribedById ).to.equal( view.statusView.element.id );
5757
} );
5858
} );
5959

0 commit comments

Comments
 (0)