Skip to content

Commit

Permalink
fix: add aria-hidden to number field controls (#3467) (#3469)
Browse files Browse the repository at this point in the history
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
  • Loading branch information
vaadin-bot and web-padawan committed Feb 18, 2022
1 parent ea0a703 commit 50007df
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ snapshots["vaadin-integer-field shadow default"] =
</div>
<vaadin-input-container part="input-field">
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -39,6 +40,7 @@ snapshots["vaadin-integer-field shadow default"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -70,6 +72,7 @@ snapshots["vaadin-integer-field shadow controls"] =
</div>
<vaadin-input-container part="input-field">
<div
aria-hidden="true"
part="decrease-button"
slot="prefix"
>
Expand All @@ -94,6 +97,7 @@ snapshots["vaadin-integer-field shadow controls"] =
>
</div>
<div
aria-hidden="true"
part="increase-button"
slot="suffix"
>
Expand Down Expand Up @@ -127,6 +131,7 @@ snapshots["vaadin-integer-field shadow disabled"] =
part="input-field"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -152,6 +157,7 @@ snapshots["vaadin-integer-field shadow disabled"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -186,6 +192,7 @@ snapshots["vaadin-integer-field shadow readonly"] =
readonly=""
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -211,6 +218,7 @@ snapshots["vaadin-integer-field shadow readonly"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -245,6 +253,7 @@ snapshots["vaadin-integer-field shadow invalid"] =
part="input-field"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -270,6 +279,7 @@ snapshots["vaadin-integer-field shadow invalid"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -304,6 +314,7 @@ snapshots["vaadin-integer-field shadow theme"] =
theme="align-right"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -329,6 +340,7 @@ snapshots["vaadin-integer-field shadow theme"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down
2 changes: 2 additions & 0 deletions packages/number-field/src/vaadin-number-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(E
on-click="_decreaseValue"
on-touchend="_decreaseButtonTouchend"
hidden$="[[!hasControls]]"
aria-hidden="true"
slot="prefix"
></div>
<slot name="prefix" slot="prefix"></slot>
Expand All @@ -112,6 +113,7 @@ export class NumberField extends InputFieldMixin(SlotStylesMixin(ThemableMixin(E
on-click="_increaseValue"
on-touchend="_increaseButtonTouchend"
hidden$="[[!hasControls]]"
aria-hidden="true"
slot="suffix"
></div>
</vaadin-input-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ snapshots["vaadin-number-field shadow default"] =
</div>
<vaadin-input-container part="input-field">
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -39,6 +40,7 @@ snapshots["vaadin-number-field shadow default"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -70,6 +72,7 @@ snapshots["vaadin-number-field shadow controls"] =
</div>
<vaadin-input-container part="input-field">
<div
aria-hidden="true"
part="decrease-button"
slot="prefix"
>
Expand All @@ -94,6 +97,7 @@ snapshots["vaadin-number-field shadow controls"] =
>
</div>
<div
aria-hidden="true"
part="increase-button"
slot="suffix"
>
Expand Down Expand Up @@ -127,6 +131,7 @@ snapshots["vaadin-number-field shadow disabled"] =
part="input-field"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -152,6 +157,7 @@ snapshots["vaadin-number-field shadow disabled"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -186,6 +192,7 @@ snapshots["vaadin-number-field shadow readonly"] =
readonly=""
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -211,6 +218,7 @@ snapshots["vaadin-number-field shadow readonly"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -245,6 +253,7 @@ snapshots["vaadin-number-field shadow invalid"] =
part="input-field"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -270,6 +279,7 @@ snapshots["vaadin-number-field shadow invalid"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down Expand Up @@ -304,6 +314,7 @@ snapshots["vaadin-number-field shadow theme"] =
theme="align-right"
>
<div
aria-hidden="true"
hidden=""
part="decrease-button"
slot="prefix"
Expand All @@ -329,6 +340,7 @@ snapshots["vaadin-number-field shadow theme"] =
>
</div>
<div
aria-hidden="true"
hidden=""
part="increase-button"
slot="suffix"
Expand Down

0 comments on commit 50007df

Please sign in to comment.