diff --git a/packages/ui-react/src/components/Account/Account.tsx b/packages/ui-react/src/components/Account/Account.tsx index 06c928205..70de998cc 100644 --- a/packages/ui-react/src/components/Account/Account.tsx +++ b/packages/ui-react/src/components/Account/Account.tsx @@ -242,6 +242,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } helperText={section.errors?.firstName} disabled={section.isBusy} editing={section.isEditing} + autoComplete="given-name" lang={htmlLang} /> @@ -284,6 +286,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } helperText={section.errors?.email} disabled={section.isBusy} editing={section.isEditing} + autoComplete="email" required /> {section.isEditing && ( @@ -296,6 +299,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } helperText={section.errors?.confirmationPassword} type={viewPassword ? 'text' : 'password'} disabled={section.isBusy} + autoComplete="current-password" rightControl={ toggleViewPassword()}> diff --git a/packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap b/packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap index 8d19e2e73..cf5d14273 100644 --- a/packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap +++ b/packages/ui-react/src/components/Account/__snapshots__/Account.test.tsx.snap @@ -37,6 +37,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_firstname" aria-invalid="false" aria-required="false" + autocomplete="given-name" class="_input_e16c1b" id="text-field_1235_firstname" lang="en" @@ -59,6 +60,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_lastname" aria-invalid="false" aria-required="false" + autocomplete="family-name" class="_input_e16c1b" id="text-field_1235_lastname" lang="en" @@ -112,6 +114,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_email" aria-invalid="false" aria-required="true" + autocomplete="email" class="_input_e16c1b" id="text-field_1235_email" name="email" diff --git a/packages/ui-react/src/components/CheckoutForm/__snapshots__/CheckoutForm.test.tsx.snap b/packages/ui-react/src/components/CheckoutForm/__snapshots__/CheckoutForm.test.tsx.snap index 7111ff503..0999384b7 100644 --- a/packages/ui-react/src/components/CheckoutForm/__snapshots__/CheckoutForm.test.tsx.snap +++ b/packages/ui-react/src/components/CheckoutForm/__snapshots__/CheckoutForm.test.tsx.snap @@ -100,6 +100,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_cardholdername" aria-invalid="false" aria-required="true" + autocomplete="cc-name" class="_input_e16c1b" id="text-field_1235_cardholdername" name="cardholderName" @@ -128,6 +129,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_cardnumber" aria-invalid="false" aria-required="true" + autocomplete="cc-number" class="_input_e16c1b" id="text-field_1235_cardnumber" name="cardNumber" @@ -160,6 +162,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_cardexpiry" aria-invalid="false" aria-required="true" + autocomplete="cc-exp" class="_input_e16c1b" id="text-field_1235_cardexpiry" name="cardExpiry" @@ -190,6 +193,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-invalid="false" aria-label="payment.security_code" aria-required="true" + autocomplete="cc-csc" class="_input_e16c1b" id="text-field_1235_cardcvc" name="cardCVC" diff --git a/packages/ui-react/src/components/CreditCardCVCField/CreditCardCVCField.tsx b/packages/ui-react/src/components/CreditCardCVCField/CreditCardCVCField.tsx index 576fdfe7c..4be56f464 100644 --- a/packages/ui-react/src/components/CreditCardCVCField/CreditCardCVCField.tsx +++ b/packages/ui-react/src/components/CreditCardCVCField/CreditCardCVCField.tsx @@ -33,6 +33,7 @@ const CreditCardCVCField: React.FC = ({ value, onChange, error, ...props onChange={formatCVC} pattern="\d*" placeholder="###" + autoComplete="cc-csc" required /> ); diff --git a/packages/ui-react/src/components/CreditCardCVCField/__snapshots__/CreditCardCVCField.test.tsx.snap b/packages/ui-react/src/components/CreditCardCVCField/__snapshots__/CreditCardCVCField.test.tsx.snap index 907b37482..63a19fa2a 100644 --- a/packages/ui-react/src/components/CreditCardCVCField/__snapshots__/CreditCardCVCField.test.tsx.snap +++ b/packages/ui-react/src/components/CreditCardCVCField/__snapshots__/CreditCardCVCField.test.tsx.snap @@ -19,6 +19,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-invalid="false" aria-label="payment.security_code" aria-required="true" + autocomplete="cc-csc" class="_input_e16c1b" id="text-field_1235_cardcvc" name="cardCVC" diff --git a/packages/ui-react/src/components/CreditCardExpiryField/CreditCardExpiryField.tsx b/packages/ui-react/src/components/CreditCardExpiryField/CreditCardExpiryField.tsx index 784035037..37c74b881 100644 --- a/packages/ui-react/src/components/CreditCardExpiryField/CreditCardExpiryField.tsx +++ b/packages/ui-react/src/components/CreditCardExpiryField/CreditCardExpiryField.tsx @@ -45,6 +45,7 @@ const CreditCardExpiryField: React.FC = ({ value, onChange, error, ...pro type="text" pattern="\d*" placeholder="MM/YY" + autoComplete="cc-exp" required /> ); diff --git a/packages/ui-react/src/components/CreditCardExpiryField/__snapshots__/CreditCardExpiryField.test.tsx.snap b/packages/ui-react/src/components/CreditCardExpiryField/__snapshots__/CreditCardExpiryField.test.tsx.snap index 8a88f1e31..1f2092c2d 100644 --- a/packages/ui-react/src/components/CreditCardExpiryField/__snapshots__/CreditCardExpiryField.test.tsx.snap +++ b/packages/ui-react/src/components/CreditCardExpiryField/__snapshots__/CreditCardExpiryField.test.tsx.snap @@ -18,6 +18,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_cardexpiry" aria-invalid="false" aria-required="true" + autocomplete="cc-exp" class="_input_e16c1b" id="text-field_1235_cardexpiry" name="cardExpiry" diff --git a/packages/ui-react/src/components/CreditCardNumberField/CreditCardNumberField.tsx b/packages/ui-react/src/components/CreditCardNumberField/CreditCardNumberField.tsx index db9f5dca5..fb9957c79 100644 --- a/packages/ui-react/src/components/CreditCardNumberField/CreditCardNumberField.tsx +++ b/packages/ui-react/src/components/CreditCardNumberField/CreditCardNumberField.tsx @@ -73,6 +73,7 @@ const CreditCardNumberField: React.FC = ({ value, error, onChange, onBlur type="text" placeholder="1234 5678 9012 3456" rightControl={cardIssuer} + autoComplete="cc-number" required /> ); diff --git a/packages/ui-react/src/components/CreditCardNumberField/__snapshots__/CreditCardNumberField.test.tsx.snap b/packages/ui-react/src/components/CreditCardNumberField/__snapshots__/CreditCardNumberField.test.tsx.snap index 0e1412821..b06118109 100644 --- a/packages/ui-react/src/components/CreditCardNumberField/__snapshots__/CreditCardNumberField.test.tsx.snap +++ b/packages/ui-react/src/components/CreditCardNumberField/__snapshots__/CreditCardNumberField.test.tsx.snap @@ -18,6 +18,7 @@ exports[` > renders and matches snapshot 1`] = ` aria-describedby="helper_text_1235_cardnumber" aria-invalid="false" aria-required="true" + autocomplete="cc-number" class="_input_e16c1b" id="text-field_1235_cardnumber" name="cardNumber" diff --git a/packages/ui-react/src/components/CustomRegisterField/__snapshots__/CustomRegisterField.test.tsx.snap b/packages/ui-react/src/components/CustomRegisterField/__snapshots__/CustomRegisterField.test.tsx.snap index e9a7dba46..327f8c779 100644 --- a/packages/ui-react/src/components/CustomRegisterField/__snapshots__/CustomRegisterField.test.tsx.snap +++ b/packages/ui-react/src/components/CustomRegisterField/__snapshots__/CustomRegisterField.test.tsx.snap @@ -101,6 +101,7 @@ exports[` > renders and matches snapshot > renders and matches snapshot > renders and matches snapshot = ({ maxLength={2} type="number" id={`${id}-date`} + autoComplete="bday-day" /> {' / '} = ({ maxLength={2} type="number" id={`${id}-month`} + autoComplete="bday-month" /> {' / '} = ({ maxLength={4} type="number" id={`${id}-year`} + autoComplete="bday-year" /> diff --git a/packages/ui-react/src/components/EditCardPaymentForm/EditCardPaymentForm.tsx b/packages/ui-react/src/components/EditCardPaymentForm/EditCardPaymentForm.tsx index 9881a4afc..369610415 100644 --- a/packages/ui-react/src/components/EditCardPaymentForm/EditCardPaymentForm.tsx +++ b/packages/ui-react/src/components/EditCardPaymentForm/EditCardPaymentForm.tsx @@ -109,6 +109,7 @@ const EditCardPaymentForm: React.FC = ({ onCancel, setUpdatingCardDetails onChange={paymentData?.handleChange} onBlur={paymentData?.handleBlur} placeholder={t('checkout.credit_card_name')} + autoComplete="cc-name" required /> diff --git a/packages/ui-react/src/components/EditPasswordForm/EditPasswordForm.tsx b/packages/ui-react/src/components/EditPasswordForm/EditPasswordForm.tsx index 58214e75e..5d2aae4be 100644 --- a/packages/ui-react/src/components/EditPasswordForm/EditPasswordForm.tsx +++ b/packages/ui-react/src/components/EditPasswordForm/EditPasswordForm.tsx @@ -76,6 +76,7 @@ const EditPasswordForm: React.FC = ({ placeholder={t('reset.reset_password_token')} name="resetPasswordToken" type="text" + autoComplete="" required /> )} diff --git a/packages/ui-react/src/components/ForgotPasswordForm/ForgotPasswordForm.tsx b/packages/ui-react/src/components/ForgotPasswordForm/ForgotPasswordForm.tsx index ae3c69613..47d950cf9 100644 --- a/packages/ui-react/src/components/ForgotPasswordForm/ForgotPasswordForm.tsx +++ b/packages/ui-react/src/components/ForgotPasswordForm/ForgotPasswordForm.tsx @@ -36,9 +36,10 @@ const ForgotPasswordForm: React.FC = ({ onSubmit, onChange, value, errors placeholder={t('reset.email')} error={!!errors.email || !!errors.form} helperText={errors.email} - required name="email" type="email" + autoComplete="email" + required />