Skip to content

Commit 61076cb

Browse files
authored
fix: add aria-hidden to number field controls (#3467)
1 parent 0a8c2b9 commit 61076cb

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎packages/integer-field/test/dom/__snapshots__/integer-field.test.snap.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ snapshots["vaadin-integer-field shadow default"] =
1414
</div>
1515
<vaadin-input-container part="input-field">
1616
<div
17+
aria-hidden="true"
1718
hidden=""
1819
part="decrease-button"
1920
slot="prefix"
@@ -39,6 +40,7 @@ snapshots["vaadin-integer-field shadow default"] =
3940
>
4041
</div>
4142
<div
43+
aria-hidden="true"
4244
hidden=""
4345
part="increase-button"
4446
slot="suffix"
@@ -70,6 +72,7 @@ snapshots["vaadin-integer-field shadow controls"] =
7072
</div>
7173
<vaadin-input-container part="input-field">
7274
<div
75+
aria-hidden="true"
7376
part="decrease-button"
7477
slot="prefix"
7578
>
@@ -94,6 +97,7 @@ snapshots["vaadin-integer-field shadow controls"] =
9497
>
9598
</div>
9699
<div
100+
aria-hidden="true"
97101
part="increase-button"
98102
slot="suffix"
99103
>
@@ -127,6 +131,7 @@ snapshots["vaadin-integer-field shadow disabled"] =
127131
part="input-field"
128132
>
129133
<div
134+
aria-hidden="true"
130135
hidden=""
131136
part="decrease-button"
132137
slot="prefix"
@@ -152,6 +157,7 @@ snapshots["vaadin-integer-field shadow disabled"] =
152157
>
153158
</div>
154159
<div
160+
aria-hidden="true"
155161
hidden=""
156162
part="increase-button"
157163
slot="suffix"
@@ -186,6 +192,7 @@ snapshots["vaadin-integer-field shadow readonly"] =
186192
readonly=""
187193
>
188194
<div
195+
aria-hidden="true"
189196
hidden=""
190197
part="decrease-button"
191198
slot="prefix"
@@ -211,6 +218,7 @@ snapshots["vaadin-integer-field shadow readonly"] =
211218
>
212219
</div>
213220
<div
221+
aria-hidden="true"
214222
hidden=""
215223
part="increase-button"
216224
slot="suffix"
@@ -245,6 +253,7 @@ snapshots["vaadin-integer-field shadow invalid"] =
245253
part="input-field"
246254
>
247255
<div
256+
aria-hidden="true"
248257
hidden=""
249258
part="decrease-button"
250259
slot="prefix"
@@ -270,6 +279,7 @@ snapshots["vaadin-integer-field shadow invalid"] =
270279
>
271280
</div>
272281
<div
282+
aria-hidden="true"
273283
hidden=""
274284
part="increase-button"
275285
slot="suffix"
@@ -304,6 +314,7 @@ snapshots["vaadin-integer-field shadow theme"] =
304314
theme="align-right"
305315
>
306316
<div
317+
aria-hidden="true"
307318
hidden=""
308319
part="decrease-button"
309320
slot="prefix"
@@ -329,6 +340,7 @@ snapshots["vaadin-integer-field shadow theme"] =
329340
>
330341
</div>
331342
<div
343+
aria-hidden="true"
332344
hidden=""
333345
part="increase-button"
334346
slot="suffix"

‎packages/number-field/src/vaadin-number-field.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(E
100100
on-click="_decreaseValue"
101101
on-touchend="_decreaseButtonTouchend"
102102
hidden$="[[!hasControls]]"
103+
aria-hidden="true"
103104
slot="prefix"
104105
></div>
105106
<slot name="prefix" slot="prefix"></slot>
@@ -112,6 +113,7 @@ export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(E
112113
on-click="_increaseValue"
113114
on-touchend="_increaseButtonTouchend"
114115
hidden$="[[!hasControls]]"
116+
aria-hidden="true"
115117
slot="suffix"
116118
></div>
117119
</vaadin-input-container>

‎packages/number-field/test/dom/__snapshots__/number-field.test.snap.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ snapshots["vaadin-number-field shadow default"] =
1414
</div>
1515
<vaadin-input-container part="input-field">
1616
<div
17+
aria-hidden="true"
1718
hidden=""
1819
part="decrease-button"
1920
slot="prefix"
@@ -39,6 +40,7 @@ snapshots["vaadin-number-field shadow default"] =
3940
>
4041
</div>
4142
<div
43+
aria-hidden="true"
4244
hidden=""
4345
part="increase-button"
4446
slot="suffix"
@@ -70,6 +72,7 @@ snapshots["vaadin-number-field shadow controls"] =
7072
</div>
7173
<vaadin-input-container part="input-field">
7274
<div
75+
aria-hidden="true"
7376
part="decrease-button"
7477
slot="prefix"
7578
>
@@ -94,6 +97,7 @@ snapshots["vaadin-number-field shadow controls"] =
9497
>
9598
</div>
9699
<div
100+
aria-hidden="true"
97101
part="increase-button"
98102
slot="suffix"
99103
>
@@ -127,6 +131,7 @@ snapshots["vaadin-number-field shadow disabled"] =
127131
part="input-field"
128132
>
129133
<div
134+
aria-hidden="true"
130135
hidden=""
131136
part="decrease-button"
132137
slot="prefix"
@@ -152,6 +157,7 @@ snapshots["vaadin-number-field shadow disabled"] =
152157
>
153158
</div>
154159
<div
160+
aria-hidden="true"
155161
hidden=""
156162
part="increase-button"
157163
slot="suffix"
@@ -186,6 +192,7 @@ snapshots["vaadin-number-field shadow readonly"] =
186192
readonly=""
187193
>
188194
<div
195+
aria-hidden="true"
189196
hidden=""
190197
part="decrease-button"
191198
slot="prefix"
@@ -211,6 +218,7 @@ snapshots["vaadin-number-field shadow readonly"] =
211218
>
212219
</div>
213220
<div
221+
aria-hidden="true"
214222
hidden=""
215223
part="increase-button"
216224
slot="suffix"
@@ -245,6 +253,7 @@ snapshots["vaadin-number-field shadow invalid"] =
245253
part="input-field"
246254
>
247255
<div
256+
aria-hidden="true"
248257
hidden=""
249258
part="decrease-button"
250259
slot="prefix"
@@ -270,6 +279,7 @@ snapshots["vaadin-number-field shadow invalid"] =
270279
>
271280
</div>
272281
<div
282+
aria-hidden="true"
273283
hidden=""
274284
part="increase-button"
275285
slot="suffix"
@@ -304,6 +314,7 @@ snapshots["vaadin-number-field shadow theme"] =
304314
theme="align-right"
305315
>
306316
<div
317+
aria-hidden="true"
307318
hidden=""
308319
part="decrease-button"
309320
slot="prefix"
@@ -329,6 +340,7 @@ snapshots["vaadin-number-field shadow theme"] =
329340
>
330341
</div>
331342
<div
343+
aria-hidden="true"
332344
hidden=""
333345
part="increase-button"
334346
slot="suffix"

0 commit comments

Comments
 (0)