Skip to content

Commit 2bada7f

Browse files
authored
Update proper value for autocomplete attribute on checkout screen for contact section (#103825)
* change autocomplete attribute for billing postal code * adjust autocomplete to other input fields
1 parent eead93c commit 2bada7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/my-sites/checkout/src/components/tax-fields.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default function TaxFields( {
142142
)
143143
);
144144
} }
145-
autoComplete={ section + ' postal-code' }
145+
autoComplete={ `section-${ section } postal-code` }
146146
isError={ postalCode?.isTouched && ! isValid( postalCode ) }
147147
errorMessage={
148148
postalCode?.errors?.[ 0 ] ?? String( translate( 'This field is required.' ) )
@@ -174,7 +174,7 @@ export default function TaxFields( {
174174
)
175175
);
176176
} }
177-
autoComplete={ section + ' city' }
177+
autoComplete={ `section-${ section } city` }
178178
isError={ city?.isTouched && ! isValid( city ) }
179179
errorMessage={ city?.errors?.[ 0 ] ?? String( translate( 'This field is required.' ) ) }
180180
/>
@@ -231,7 +231,7 @@ export default function TaxFields( {
231231
)
232232
);
233233
} }
234-
autoComplete="organization"
234+
autoComplete={ `section-${ section } organization` }
235235
/>
236236
);
237237
}
@@ -259,7 +259,7 @@ export default function TaxFields( {
259259
)
260260
);
261261
} }
262-
autoComplete="address"
262+
autoComplete={ `section-${ section } street-address` }
263263
/>
264264
);
265265
}

client/my-sites/checkout/src/components/vat-form/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export function VatForm( {
261261
} )
262262
}
263263
value={ vatDetailsInForm.address ?? '' }
264-
autoComplete="address"
264+
autoComplete={ `section-${ section } street-address` }
265265
disabled={ isDisabled }
266266
onChange={ ( newValue: string ) => {
267267
setVatDetailsInForm( {

0 commit comments

Comments
 (0)