@magento/venia-ui 9.7.0 → 10.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/i18n/en_US.json +23 -2
- package/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +1 -1
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.shimmer.spec.js.snap +6 -0
- package/lib/components/AccountChip/__tests__/__snapshots__/accountChip.spec.js.snap +3 -0
- package/lib/components/AccountChip/accountChip.js +14 -1
- package/lib/components/AccountInformationPage/__tests__/__snapshots__/editForm.spec.js.snap +15 -0
- package/lib/components/AddressBookPage/__tests__/__snapshots__/addEditDialog.spec.js.snap +28 -0
- package/lib/components/App/__tests__/app.spec.js +3 -1
- package/lib/components/App/app.js +1 -1
- package/lib/components/CartPage/GiftCards/__tests__/__snapshots__/giftCards.spec.js.snap +2 -0
- package/lib/components/CartPage/PriceAdjustments/CouponCode/__tests__/__snapshots__/couponCode.spec.js.snap +9 -3
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/__tests__/__snapshots__/shippingForm.spec.js.snap +15 -0
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/priceSummary.spec.js.snap +0 -2
- package/lib/components/CartPage/PriceSummary/priceSummary.js +2 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +4 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/product.spec.js.snap +6 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/quantity.spec.js.snap +1 -0
- package/lib/components/CategoryTree/categoryBranch.js +1 -1
- package/lib/components/CategoryTree/categoryLeaf.js +1 -1
- package/lib/components/CategoryTree/categoryTree.js +1 -1
- package/lib/components/Checkout/__tests__/__snapshots__/addressForm.spec.js.snap +16 -0
- package/lib/components/Checkout/__tests__/__snapshots__/paymentsForm.spec.js.snap +7 -0
- package/lib/components/Checkout/section.module.css +0 -1
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/createAccount.spec.js.snap +20 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +16 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/customerForm.spec.js.snap +46 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +68 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +36 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +36 -0
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +1 -1
- package/lib/components/CheckoutPage/checkoutPage.js +4 -0
- package/lib/components/Country/__tests__/__snapshots__/country.spec.js.snap +2 -0
- package/lib/components/CreateAccount/__tests__/__snapshots__/createAccount.spec.js.snap +36 -10
- package/lib/components/CreateAccount/createAccount.js +18 -0
- package/lib/components/Field/fieldIcons.js +3 -1
- package/lib/components/FilterModalOpenButton/filterModalOpenButton.js +12 -2
- package/lib/components/ForgotPassword/ForgotPasswordForm/__tests__/__snapshots__/forgotPasswordForm.spec.js.snap +2 -0
- package/lib/components/Gallery/__tests__/__snapshots__/gallery.spec.js.snap +2 -0
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +3 -0
- package/lib/components/Gallery/item.js +1 -0
- package/lib/components/Header/__tests__/__snapshots__/accountTrigger.spec.js.snap +1 -1
- package/lib/components/Header/accountTrigger.js +12 -5
- package/lib/components/Image/placeholderImage.js +1 -0
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/kebab.spec.js.snap +2 -0
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +3 -0
- package/lib/components/LegacyMiniCart/kebab.js +14 -0
- package/lib/components/Link/__tests__/link.spec.js +8 -6
- package/lib/components/Link/link.js +1 -1
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +8 -0
- package/lib/components/MiniCart/ProductList/item.js +11 -0
- package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +16 -4
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.spec.js.snap +2 -0
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderHistoryPage.spec.js.snap +13 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderRow.spec.js.snap +4 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/resetButton.spec.js.snap +3 -0
- package/lib/components/OrderHistoryPage/collapsedImageGallery.js +3 -3
- package/lib/components/OrderHistoryPage/orderHistoryPage.js +1 -0
- package/lib/components/OrderHistoryPage/orderRow.js +1 -0
- package/lib/components/OrderHistoryPage/resetButton.js +13 -2
- package/lib/components/PageLoadingIndicator/__tests__/pageLoadingIndicator.spec.js +1 -1
- package/lib/components/PageLoadingIndicator/pageLoadingIndicator.js +1 -1
- package/lib/components/Password/__tests__/__snapshots__/password.spec.js.snap +13 -3
- package/lib/components/Password/password.js +24 -2
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/carousel.spec.js.snap +18 -16
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/thumbnail.spec.js.snap +12 -12
- package/lib/components/ProductImageCarousel/__tests__/thumbnail.spec.js +2 -2
- package/lib/components/ProductImageCarousel/thumbnail.js +4 -5
- package/lib/components/ProductImageCarousel/thumbnail.module.css +0 -1
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +6 -0
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatchList.spec.js.snap +1 -0
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +2 -1
- package/lib/components/ProductOptions/option.js +1 -0
- package/lib/components/ProductOptions/swatch.js +5 -2
- package/lib/components/ProductOptions/swatchList.js +5 -2
- package/lib/components/ProductSort/__tests__/__snapshots__/productSort.spec.js.snap +1 -0
- package/lib/components/ProductSort/productSort.js +17 -0
- package/lib/components/QuantityStepper/quantityStepper.module.css +0 -2
- package/lib/components/Region/__tests__/__snapshots__/region.spec.js.snap +3 -0
- package/lib/components/SearchBar/__tests__/__snapshots__/searchField.spec.js.snap +1 -0
- package/lib/components/SearchBar/__tests__/__snapshots__/suggestedProduct.spec.js.snap +1 -0
- package/lib/components/SearchBar/searchBar.js +6 -1
- package/lib/components/SearchBar/searchField.js +4 -2
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +28 -28
- package/lib/components/SearchPage/searchPage.js +6 -4
- package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +12 -0
- package/lib/components/SignIn/signIn.js +10 -0
- package/lib/components/Trigger/__tests__/__snapshots__/trigger.spec.js.snap +8 -2
- package/lib/components/Trigger/trigger.js +30 -5
- package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/__tests__/__snapshots__/createWishlistForm.spec.js.snap +2 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/createWishlist.ee.spec.js.snap +1 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistEditFavoritesListDialog.spec.js.snap +4 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistItem.spec.js.snap +2 -0
- package/lib/index.module.css +7 -9
- package/package.json +2 -2
|
@@ -153,6 +153,10 @@ const GuestForm = props => {
|
|
|
153
153
|
id="email"
|
|
154
154
|
data-cy="GuestForm-email"
|
|
155
155
|
validate={isRequired}
|
|
156
|
+
aria-label={formatMessage({
|
|
157
|
+
id: 'global.emailRequired',
|
|
158
|
+
defaultMessage: 'Email Required'
|
|
159
|
+
})}
|
|
156
160
|
onBlur={() =>
|
|
157
161
|
handleValidateEmail(
|
|
158
162
|
formApiRef.current.getValue('email')
|
|
@@ -185,6 +189,10 @@ const GuestForm = props => {
|
|
|
185
189
|
id="firstname"
|
|
186
190
|
data-cy="GuestForm-firstName"
|
|
187
191
|
validate={isRequired}
|
|
192
|
+
aria-label={formatMessage({
|
|
193
|
+
id: 'global.firstNameRequired',
|
|
194
|
+
defaultMessage: 'First Name Required'
|
|
195
|
+
})}
|
|
188
196
|
/>
|
|
189
197
|
</Field>
|
|
190
198
|
</div>
|
|
@@ -205,6 +213,10 @@ const GuestForm = props => {
|
|
|
205
213
|
id="lastname"
|
|
206
214
|
data-cy="GuestForm-lastName"
|
|
207
215
|
validate={isRequired}
|
|
216
|
+
aria-label={formatMessage({
|
|
217
|
+
id: 'global.lastNameRequired',
|
|
218
|
+
defaultMessage: 'Last Name Required'
|
|
219
|
+
})}
|
|
208
220
|
/>
|
|
209
221
|
</Field>
|
|
210
222
|
</div>
|
|
@@ -216,6 +228,10 @@ const GuestForm = props => {
|
|
|
216
228
|
})}
|
|
217
229
|
validate={isRequired}
|
|
218
230
|
data-cy="GuestForm-country"
|
|
231
|
+
aria-label={formatMessage({
|
|
232
|
+
id: 'global.countryRequired',
|
|
233
|
+
defaultMessage: 'Country Required'
|
|
234
|
+
})}
|
|
219
235
|
/>
|
|
220
236
|
</div>
|
|
221
237
|
<div className={classes.street0}>
|
|
@@ -235,6 +251,10 @@ const GuestForm = props => {
|
|
|
235
251
|
id="street0"
|
|
236
252
|
data-cy="GuestForm-street0"
|
|
237
253
|
validate={isRequired}
|
|
254
|
+
aria-label={formatMessage({
|
|
255
|
+
id: 'global.streetAddressRequired',
|
|
256
|
+
defaultMessage: 'Street Address Required'
|
|
257
|
+
})}
|
|
238
258
|
/>
|
|
239
259
|
</Field>
|
|
240
260
|
</div>
|
|
@@ -275,6 +295,10 @@ const GuestForm = props => {
|
|
|
275
295
|
id="city"
|
|
276
296
|
data-cy="GuestForm-city"
|
|
277
297
|
validate={isRequired}
|
|
298
|
+
aria-label={formatMessage({
|
|
299
|
+
id: 'global.cityRequired',
|
|
300
|
+
defaultMessage: 'City Required'
|
|
301
|
+
})}
|
|
278
302
|
/>
|
|
279
303
|
</Field>
|
|
280
304
|
</div>
|
|
@@ -289,6 +313,10 @@ const GuestForm = props => {
|
|
|
289
313
|
fieldSelect={'region[region_id]'}
|
|
290
314
|
optionValueKey={'id'}
|
|
291
315
|
data-cy="GuestForm-region"
|
|
316
|
+
aria-label={formatMessage({
|
|
317
|
+
id: 'global.stateRequired',
|
|
318
|
+
defaultMessage: 'State Required'
|
|
319
|
+
})}
|
|
292
320
|
/>
|
|
293
321
|
</div>
|
|
294
322
|
<div className={classes.postcode}>
|
|
@@ -299,6 +327,10 @@ const GuestForm = props => {
|
|
|
299
327
|
})}
|
|
300
328
|
validate={isRequired}
|
|
301
329
|
data-cy="GuestForm-postcode"
|
|
330
|
+
aria-label={formatMessage({
|
|
331
|
+
id: 'global.postalCodeRequired',
|
|
332
|
+
defaultMessage: 'ZIP / Postal Code Required'
|
|
333
|
+
})}
|
|
302
334
|
/>
|
|
303
335
|
</div>
|
|
304
336
|
<div className={classes.telephone}>
|
|
@@ -318,6 +350,10 @@ const GuestForm = props => {
|
|
|
318
350
|
id="telephone"
|
|
319
351
|
data-cy="GuestForm-telephone"
|
|
320
352
|
validate={isRequired}
|
|
353
|
+
aria-label={formatMessage({
|
|
354
|
+
id: 'global.phonenumberRequired',
|
|
355
|
+
defaultMessage: 'Phone Number Required'
|
|
356
|
+
})}
|
|
321
357
|
/>
|
|
322
358
|
</Field>
|
|
323
359
|
</div>
|
|
@@ -231,7 +231,6 @@ exports[`CheckoutPage renders an error and disables review order button if there
|
|
|
231
231
|
className="review_order_button"
|
|
232
232
|
disabled={true}
|
|
233
233
|
onDragStart={[Function]}
|
|
234
|
-
onKeyDown={[Function]}
|
|
235
234
|
onKeyUp={[Function]}
|
|
236
235
|
onMouseDown={[Function]}
|
|
237
236
|
onMouseEnter={[Function]}
|
|
@@ -894,6 +893,7 @@ Object {
|
|
|
894
893
|
"disabled": true,
|
|
895
894
|
"negative": false,
|
|
896
895
|
"onClick": [MockFunction handleReviewOrder],
|
|
896
|
+
"onKeyDown": undefined,
|
|
897
897
|
"priority": "high",
|
|
898
898
|
"type": "button",
|
|
899
899
|
}
|
|
@@ -52,6 +52,7 @@ const CheckoutPage = props => {
|
|
|
52
52
|
error,
|
|
53
53
|
guestSignInUsername,
|
|
54
54
|
handlePlaceOrder,
|
|
55
|
+
handlePlaceOrderEnterKeyPress,
|
|
55
56
|
hasError,
|
|
56
57
|
isCartEmpty,
|
|
57
58
|
isGuestCheckout,
|
|
@@ -74,6 +75,7 @@ const CheckoutPage = props => {
|
|
|
74
75
|
shippingMethodRef,
|
|
75
76
|
resetReviewOrderButtonClicked,
|
|
76
77
|
handleReviewOrder,
|
|
78
|
+
handleReviewOrderEnterKeyPress,
|
|
77
79
|
reviewOrderButtonClicked,
|
|
78
80
|
recaptchaWidgetProps,
|
|
79
81
|
toggleAddressBookContent,
|
|
@@ -243,6 +245,7 @@ const CheckoutPage = props => {
|
|
|
243
245
|
checkoutStep === CHECKOUT_STEP.PAYMENT ? (
|
|
244
246
|
<Button
|
|
245
247
|
onClick={handleReviewOrder}
|
|
248
|
+
onKeyDown={handleReviewOrderEnterKeyPress}
|
|
246
249
|
priority="high"
|
|
247
250
|
className={classes.review_order_button}
|
|
248
251
|
data-cy="CheckoutPage-reviewOrderButton"
|
|
@@ -270,6 +273,7 @@ const CheckoutPage = props => {
|
|
|
270
273
|
checkoutStep === CHECKOUT_STEP.REVIEW ? (
|
|
271
274
|
<Button
|
|
272
275
|
onClick={handlePlaceOrder}
|
|
276
|
+
onKeyDown={handlePlaceOrderEnterKeyPress}
|
|
273
277
|
priority="high"
|
|
274
278
|
className={classes.place_order_button}
|
|
275
279
|
data-cy="CheckoutPage-placeOrderButton"
|
|
@@ -41,6 +41,7 @@ exports[`renders a disabled dropdown while loading 1`] = `
|
|
|
41
41
|
className="before"
|
|
42
42
|
/>
|
|
43
43
|
<span
|
|
44
|
+
aria-hidden="false"
|
|
44
45
|
className="after"
|
|
45
46
|
>
|
|
46
47
|
<span
|
|
@@ -130,6 +131,7 @@ exports[`renders dropdown with country data 1`] = `
|
|
|
130
131
|
className="before"
|
|
131
132
|
/>
|
|
132
133
|
<span
|
|
134
|
+
aria-hidden="false"
|
|
133
135
|
className="after"
|
|
134
136
|
>
|
|
135
137
|
<span
|
|
@@ -28,6 +28,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
28
28
|
>
|
|
29
29
|
<span>
|
|
30
30
|
<input
|
|
31
|
+
aria-label="First Name Required"
|
|
31
32
|
autoComplete="given-name"
|
|
32
33
|
id="firstName"
|
|
33
34
|
name="customer.firstname"
|
|
@@ -37,7 +38,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
37
38
|
/>
|
|
38
39
|
</span>
|
|
39
40
|
<span />
|
|
40
|
-
<span
|
|
41
|
+
<span
|
|
42
|
+
aria-hidden="false"
|
|
43
|
+
/>
|
|
41
44
|
</span>
|
|
42
45
|
<p />
|
|
43
46
|
</div>
|
|
@@ -57,6 +60,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
57
60
|
>
|
|
58
61
|
<span>
|
|
59
62
|
<input
|
|
63
|
+
aria-label="Last Name Required"
|
|
60
64
|
autoComplete="family-name"
|
|
61
65
|
id="lastName"
|
|
62
66
|
name="customer.lastname"
|
|
@@ -66,7 +70,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
66
70
|
/>
|
|
67
71
|
</span>
|
|
68
72
|
<span />
|
|
69
|
-
<span
|
|
73
|
+
<span
|
|
74
|
+
aria-hidden="false"
|
|
75
|
+
/>
|
|
70
76
|
</span>
|
|
71
77
|
<p />
|
|
72
78
|
</div>
|
|
@@ -86,6 +92,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
86
92
|
>
|
|
87
93
|
<span>
|
|
88
94
|
<input
|
|
95
|
+
aria-label="Email Required"
|
|
89
96
|
autoComplete="email"
|
|
90
97
|
id="Email"
|
|
91
98
|
name="customer.email"
|
|
@@ -95,7 +102,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
95
102
|
/>
|
|
96
103
|
</span>
|
|
97
104
|
<span />
|
|
98
|
-
<span
|
|
105
|
+
<span
|
|
106
|
+
aria-hidden="false"
|
|
107
|
+
/>
|
|
99
108
|
</span>
|
|
100
109
|
<p />
|
|
101
110
|
</div>
|
|
@@ -115,6 +124,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
115
124
|
>
|
|
116
125
|
<span>
|
|
117
126
|
<input
|
|
127
|
+
aria-label="Password Required"
|
|
118
128
|
autoComplete="new-password"
|
|
119
129
|
id="Password"
|
|
120
130
|
name="password"
|
|
@@ -125,11 +135,14 @@ exports[`renders the correct tree 1`] = `
|
|
|
125
135
|
/>
|
|
126
136
|
</span>
|
|
127
137
|
<span />
|
|
128
|
-
<span
|
|
138
|
+
<span
|
|
139
|
+
aria-hidden="false"
|
|
140
|
+
>
|
|
129
141
|
<button
|
|
130
142
|
disabled={false}
|
|
131
143
|
onClick={[Function]}
|
|
132
144
|
onDragStart={[Function]}
|
|
145
|
+
onKey={true}
|
|
133
146
|
onKeyDown={[Function]}
|
|
134
147
|
onKeyUp={[Function]}
|
|
135
148
|
onMouseDown={[Function]}
|
|
@@ -144,6 +157,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
144
157
|
>
|
|
145
158
|
<span>
|
|
146
159
|
<svg
|
|
160
|
+
aria-label="View Password"
|
|
147
161
|
fill="none"
|
|
148
162
|
height={24}
|
|
149
163
|
stroke="currentColor"
|
|
@@ -215,7 +229,6 @@ exports[`renders the correct tree 1`] = `
|
|
|
215
229
|
disabled={false}
|
|
216
230
|
onClick={[Function]}
|
|
217
231
|
onDragStart={[Function]}
|
|
218
|
-
onKeyDown={[Function]}
|
|
219
232
|
onKeyUp={[Function]}
|
|
220
233
|
onMouseDown={[Function]}
|
|
221
234
|
onMouseEnter={[Function]}
|
|
@@ -266,6 +279,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
266
279
|
>
|
|
267
280
|
<span>
|
|
268
281
|
<input
|
|
282
|
+
aria-label="First Name Required"
|
|
269
283
|
autoComplete="given-name"
|
|
270
284
|
id="firstName"
|
|
271
285
|
name="customer.firstname"
|
|
@@ -275,7 +289,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
275
289
|
/>
|
|
276
290
|
</span>
|
|
277
291
|
<span />
|
|
278
|
-
<span
|
|
292
|
+
<span
|
|
293
|
+
aria-hidden="false"
|
|
294
|
+
/>
|
|
279
295
|
</span>
|
|
280
296
|
<p />
|
|
281
297
|
</div>
|
|
@@ -295,6 +311,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
295
311
|
>
|
|
296
312
|
<span>
|
|
297
313
|
<input
|
|
314
|
+
aria-label="Last Name Required"
|
|
298
315
|
autoComplete="family-name"
|
|
299
316
|
id="lastName"
|
|
300
317
|
name="customer.lastname"
|
|
@@ -304,7 +321,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
304
321
|
/>
|
|
305
322
|
</span>
|
|
306
323
|
<span />
|
|
307
|
-
<span
|
|
324
|
+
<span
|
|
325
|
+
aria-hidden="false"
|
|
326
|
+
/>
|
|
308
327
|
</span>
|
|
309
328
|
<p />
|
|
310
329
|
</div>
|
|
@@ -324,6 +343,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
324
343
|
>
|
|
325
344
|
<span>
|
|
326
345
|
<input
|
|
346
|
+
aria-label="Email Required"
|
|
327
347
|
autoComplete="email"
|
|
328
348
|
id="Email"
|
|
329
349
|
name="customer.email"
|
|
@@ -333,7 +353,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
333
353
|
/>
|
|
334
354
|
</span>
|
|
335
355
|
<span />
|
|
336
|
-
<span
|
|
356
|
+
<span
|
|
357
|
+
aria-hidden="false"
|
|
358
|
+
/>
|
|
337
359
|
</span>
|
|
338
360
|
<p />
|
|
339
361
|
</div>
|
|
@@ -353,6 +375,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
353
375
|
>
|
|
354
376
|
<span>
|
|
355
377
|
<input
|
|
378
|
+
aria-label="Password Required"
|
|
356
379
|
autoComplete="new-password"
|
|
357
380
|
id="Password"
|
|
358
381
|
name="password"
|
|
@@ -363,11 +386,14 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
363
386
|
/>
|
|
364
387
|
</span>
|
|
365
388
|
<span />
|
|
366
|
-
<span
|
|
389
|
+
<span
|
|
390
|
+
aria-hidden="false"
|
|
391
|
+
>
|
|
367
392
|
<button
|
|
368
393
|
disabled={false}
|
|
369
394
|
onClick={[Function]}
|
|
370
395
|
onDragStart={[Function]}
|
|
396
|
+
onKey={true}
|
|
371
397
|
onKeyDown={[Function]}
|
|
372
398
|
onKeyUp={[Function]}
|
|
373
399
|
onMouseDown={[Function]}
|
|
@@ -382,6 +408,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
382
408
|
>
|
|
383
409
|
<span>
|
|
384
410
|
<svg
|
|
411
|
+
aria-label="View Password"
|
|
385
412
|
fill="none"
|
|
386
413
|
height={24}
|
|
387
414
|
stroke="currentColor"
|
|
@@ -453,7 +480,6 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
453
480
|
disabled={false}
|
|
454
481
|
onClick={[Function]}
|
|
455
482
|
onDragStart={[Function]}
|
|
456
|
-
onKeyDown={[Function]}
|
|
457
483
|
onKeyUp={[Function]}
|
|
458
484
|
onMouseDown={[Function]}
|
|
459
485
|
onMouseEnter={[Function]}
|
|
@@ -31,6 +31,7 @@ const CreateAccount = props => {
|
|
|
31
31
|
errors,
|
|
32
32
|
handleCancel,
|
|
33
33
|
handleSubmit,
|
|
34
|
+
handleEnterKeyPress,
|
|
34
35
|
isDisabled,
|
|
35
36
|
initialValues,
|
|
36
37
|
recaptchaWidgetProps
|
|
@@ -60,6 +61,7 @@ const CreateAccount = props => {
|
|
|
60
61
|
disabled={isDisabled}
|
|
61
62
|
type="submit"
|
|
62
63
|
priority="high"
|
|
64
|
+
onKeyDown={handleEnterKeyPress}
|
|
63
65
|
data-cy="CreateAccount-submitButton"
|
|
64
66
|
>
|
|
65
67
|
<FormattedMessage
|
|
@@ -99,6 +101,10 @@ const CreateAccount = props => {
|
|
|
99
101
|
mask={value => value && value.trim()}
|
|
100
102
|
maskOnBlur={true}
|
|
101
103
|
data-cy="customer-firstname"
|
|
104
|
+
aria-label={formatMessage({
|
|
105
|
+
id: 'global.firstNameRequired',
|
|
106
|
+
defaultMessage: 'First Name Required'
|
|
107
|
+
})}
|
|
102
108
|
/>
|
|
103
109
|
</Field>
|
|
104
110
|
<Field
|
|
@@ -117,6 +123,10 @@ const CreateAccount = props => {
|
|
|
117
123
|
mask={value => value && value.trim()}
|
|
118
124
|
maskOnBlur={true}
|
|
119
125
|
data-cy="customer-lastname"
|
|
126
|
+
aria-label={formatMessage({
|
|
127
|
+
id: 'global.lastNameRequired',
|
|
128
|
+
defaultMessage: 'Last Name Required'
|
|
129
|
+
})}
|
|
120
130
|
/>
|
|
121
131
|
</Field>
|
|
122
132
|
<Field
|
|
@@ -135,6 +145,10 @@ const CreateAccount = props => {
|
|
|
135
145
|
mask={value => value && value.trim()}
|
|
136
146
|
maskOnBlur={true}
|
|
137
147
|
data-cy="customer-email"
|
|
148
|
+
aria-label={formatMessage({
|
|
149
|
+
id: 'global.emailRequired',
|
|
150
|
+
defaultMessage: 'Email Required'
|
|
151
|
+
})}
|
|
138
152
|
/>
|
|
139
153
|
</Field>
|
|
140
154
|
<Password
|
|
@@ -155,6 +169,10 @@ const CreateAccount = props => {
|
|
|
155
169
|
mask={value => value && value.trim()}
|
|
156
170
|
maskOnBlur={true}
|
|
157
171
|
data-cy="password"
|
|
172
|
+
aria-label={formatMessage({
|
|
173
|
+
id: 'global.passwordRequired',
|
|
174
|
+
defaultMessage: 'Password Required'
|
|
175
|
+
})}
|
|
158
176
|
/>
|
|
159
177
|
<div className={classes.subscribe}>
|
|
160
178
|
<Checkbox
|
|
@@ -18,7 +18,9 @@ const FieldIcons = props => {
|
|
|
18
18
|
<span className={classes.root} style={style}>
|
|
19
19
|
<span className={classes.input}>{children}</span>
|
|
20
20
|
<span className={classes.before}>{before}</span>
|
|
21
|
-
<span className={classes.after}>
|
|
21
|
+
<span className={classes.after} aria-hidden="false">
|
|
22
|
+
{after}
|
|
23
|
+
</span>
|
|
22
24
|
</span>
|
|
23
25
|
);
|
|
24
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { shape, string, array } from 'prop-types';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import Button from '../Button';
|
|
5
5
|
import { useStyle } from '../../classify';
|
|
6
6
|
import defaultClasses from './filterModalOpenButton.module.css';
|
|
@@ -10,7 +10,12 @@ const FilterModalOpenButton = props => {
|
|
|
10
10
|
const { filters, classes: propsClasses } = props;
|
|
11
11
|
const classes = useStyle(defaultClasses, propsClasses);
|
|
12
12
|
const { handleOpen } = useFilterModal({ filters });
|
|
13
|
-
|
|
13
|
+
const handleKeypress = e => {
|
|
14
|
+
if (e.code == 'Enter') {
|
|
15
|
+
handleOpen;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const { formatMessage } = useIntl();
|
|
14
19
|
return (
|
|
15
20
|
<Button
|
|
16
21
|
priority={'low'}
|
|
@@ -19,9 +24,14 @@ const FilterModalOpenButton = props => {
|
|
|
19
24
|
}}
|
|
20
25
|
data-cy="FilterModalOpenButton-button"
|
|
21
26
|
onClick={handleOpen}
|
|
27
|
+
onKeyDown={handleKeypress}
|
|
22
28
|
type="button"
|
|
23
29
|
aria-live="polite"
|
|
24
30
|
aria-busy="false"
|
|
31
|
+
aria-label={formatMessage({
|
|
32
|
+
id: 'filterModalOpenButton.ariaLabel',
|
|
33
|
+
defaultMessage: 'Filter Button for Filter Options'
|
|
34
|
+
})}
|
|
25
35
|
>
|
|
26
36
|
<FormattedMessage
|
|
27
37
|
id={'productList.filter'}
|
|
@@ -41,6 +41,7 @@ exports[`renders when busy 1`] = `
|
|
|
41
41
|
className="before"
|
|
42
42
|
/>
|
|
43
43
|
<span
|
|
44
|
+
aria-hidden="false"
|
|
44
45
|
className="after"
|
|
45
46
|
/>
|
|
46
47
|
</span>
|
|
@@ -148,6 +149,7 @@ exports[`renders when not busy 1`] = `
|
|
|
148
149
|
className="before"
|
|
149
150
|
/>
|
|
150
151
|
<span
|
|
152
|
+
aria-hidden="false"
|
|
151
153
|
className="after"
|
|
152
154
|
/>
|
|
153
155
|
</span>
|
|
@@ -16,6 +16,7 @@ exports[`renders if \`items\` is an array of objects 1`] = `
|
|
|
16
16
|
>
|
|
17
17
|
<img
|
|
18
18
|
alt="Test Product 1"
|
|
19
|
+
aria-hidden="true"
|
|
19
20
|
className="image placeholder_layoutOnly"
|
|
20
21
|
height={375}
|
|
21
22
|
loading="eager"
|
|
@@ -110,6 +111,7 @@ exports[`renders if \`items\` is an array of objects 1`] = `
|
|
|
110
111
|
>
|
|
111
112
|
<img
|
|
112
113
|
alt="Test Product 2"
|
|
114
|
+
aria-hidden="true"
|
|
113
115
|
className="image placeholder_layoutOnly"
|
|
114
116
|
height={375}
|
|
115
117
|
loading="eager"
|
|
@@ -15,6 +15,7 @@ exports[`renders a placeholder item while awaiting item 1`] = `
|
|
|
15
15
|
>
|
|
16
16
|
<img
|
|
17
17
|
alt="Placeholder for gallery item image"
|
|
18
|
+
aria-hidden="true"
|
|
18
19
|
className="image placeholder_layoutOnly"
|
|
19
20
|
loading="eager"
|
|
20
21
|
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
|
|
@@ -64,6 +65,7 @@ exports[`renders correctly with valid item data 1`] = `
|
|
|
64
65
|
className="root"
|
|
65
66
|
>
|
|
66
67
|
<a
|
|
68
|
+
aria-label="Test Product"
|
|
67
69
|
className="images"
|
|
68
70
|
href="/strive-shoulder-pack.html"
|
|
69
71
|
onClick={[Function]}
|
|
@@ -73,6 +75,7 @@ exports[`renders correctly with valid item data 1`] = `
|
|
|
73
75
|
>
|
|
74
76
|
<img
|
|
75
77
|
alt="Test Product"
|
|
78
|
+
aria-hidden="true"
|
|
76
79
|
className="image placeholder_layoutOnly"
|
|
77
80
|
height={375}
|
|
78
81
|
loading="eager"
|
|
@@ -25,22 +25,29 @@ const AccountTrigger = props => {
|
|
|
25
25
|
accountMenuRef,
|
|
26
26
|
accountMenuTriggerRef,
|
|
27
27
|
setAccountMenuIsOpen,
|
|
28
|
-
handleTriggerClick
|
|
28
|
+
handleTriggerClick,
|
|
29
|
+
isUserSignedIn
|
|
29
30
|
} = talonProps;
|
|
30
31
|
|
|
31
32
|
const classes = useStyle(defaultClasses, props.classes);
|
|
32
33
|
const rootClassName = accountMenuIsOpen ? classes.root_open : classes.root;
|
|
33
34
|
const { formatMessage } = useIntl();
|
|
34
35
|
|
|
36
|
+
const ariaLabelMyMenu = formatMessage({
|
|
37
|
+
id: 'accountTrigger.ariaLabelMyMenu',
|
|
38
|
+
defaultMessage: 'Toggle My Account Menu'
|
|
39
|
+
});
|
|
40
|
+
const ariaLabelSignIn = formatMessage({
|
|
41
|
+
id: 'accountTrigger.ariaLabelSignIn',
|
|
42
|
+
defaultMessage: 'Sign In'
|
|
43
|
+
});
|
|
44
|
+
const ariaLabel = isUserSignedIn ? ariaLabelMyMenu : ariaLabelSignIn;
|
|
35
45
|
return (
|
|
36
46
|
<Fragment>
|
|
37
47
|
<div className={rootClassName} ref={accountMenuTriggerRef}>
|
|
38
48
|
<button
|
|
49
|
+
aria-label={ariaLabel}
|
|
39
50
|
aria-expanded={accountMenuIsOpen}
|
|
40
|
-
aria-label={formatMessage({
|
|
41
|
-
id: 'accountTrigger.ariaLabel',
|
|
42
|
-
defaultMessage: 'Toggle My Account Menu'
|
|
43
|
-
})}
|
|
44
51
|
className={classes.trigger}
|
|
45
52
|
onClick={handleTriggerClick}
|
|
46
53
|
data-cy="AccountTrigger-trigger"
|
|
@@ -4,6 +4,7 @@ exports[`it renders children passed to it 1`] = `
|
|
|
4
4
|
<div>
|
|
5
5
|
<button
|
|
6
6
|
aria-expanded={false}
|
|
7
|
+
aria-label="More Options Collapsed"
|
|
7
8
|
onClick={[Function]}
|
|
8
9
|
>
|
|
9
10
|
<Icon
|
|
@@ -33,6 +34,7 @@ exports[`it renders correctly without children 1`] = `
|
|
|
33
34
|
<div>
|
|
34
35
|
<button
|
|
35
36
|
aria-expanded={false}
|
|
37
|
+
aria-label="More Options Collapsed"
|
|
36
38
|
onClick={[Function]}
|
|
37
39
|
>
|
|
38
40
|
<Icon
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { node, shape, string } from 'prop-types';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
3
4
|
import { MoreVertical as MoreVerticalIcon } from 'react-feather';
|
|
4
5
|
|
|
5
6
|
import { useStyle } from '../../classify';
|
|
@@ -14,6 +15,18 @@ const Kebab = props => {
|
|
|
14
15
|
const classes = useStyle(defaultClasses, props.classes);
|
|
15
16
|
const toggleClass = isOpen ? classes.dropdown_active : classes.dropdown;
|
|
16
17
|
|
|
18
|
+
const { formatMessage } = useIntl();
|
|
19
|
+
const ariaLabelExpanded = formatMessage({
|
|
20
|
+
id: 'LegacyMiniCart.buttonExpanded',
|
|
21
|
+
defaultMessage: 'More Options Expanded'
|
|
22
|
+
});
|
|
23
|
+
const ariaLabelCollapsed = formatMessage({
|
|
24
|
+
id: 'LegacyMiniCart.buttonCollapsed',
|
|
25
|
+
defaultMessage: 'More Options Collapsed'
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const result = isOpen ? ariaLabelExpanded : ariaLabelCollapsed;
|
|
29
|
+
|
|
17
30
|
return (
|
|
18
31
|
<div className={classes.root}>
|
|
19
32
|
<button
|
|
@@ -21,6 +34,7 @@ const Kebab = props => {
|
|
|
21
34
|
className={classes.kebab}
|
|
22
35
|
data-cy="Kebab-button"
|
|
23
36
|
onClick={handleKebabClick}
|
|
37
|
+
aria-label={result}
|
|
24
38
|
ref={kebabRef}
|
|
25
39
|
>
|
|
26
40
|
<Icon src={MoreVerticalIcon} />
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { act, create } from 'react-test-renderer';
|
|
3
3
|
import { Link as RouterLink } from 'react-router-dom';
|
|
4
|
-
import useLink from '@magento/peregrine/lib/talons/Link/useLink';
|
|
4
|
+
import { useLink } from '@magento/peregrine/lib/talons/Link/useLink';
|
|
5
5
|
import Link from '../link';
|
|
6
6
|
|
|
7
7
|
jest.mock('@magento/peregrine/lib/talons/Link/useLink', () => {
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
return {
|
|
9
|
+
useLink: jest.fn(({ innerRef }) => {
|
|
10
|
+
return {
|
|
11
|
+
ref: innerRef
|
|
12
|
+
};
|
|
13
|
+
})
|
|
14
|
+
};
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
jest.mock('react-router-dom', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Link as RouterLink } from 'react-router-dom';
|
|
3
3
|
import { bool } from 'prop-types';
|
|
4
|
-
import useLink from '@magento/peregrine/lib/talons/Link/useLink';
|
|
4
|
+
import { useLink } from '@magento/peregrine/lib/talons/Link/useLink';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @kind functional component
|