Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pwa-3431::Fixed unique id,aria-label and disabled attribute warnings #4412

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const CreateAccount = props => {
<Button
data-cy="CreateAccount-cancelButton"
className={classes.cancelButton}
disabled={isDisabled}
disabled={Boolean(isDisabled)}
type="button"
priority="low"
onClick={handleCancel}
Expand All @@ -62,7 +62,7 @@ const CreateAccount = props => {
const submitButton = (
<Button
className={classes.submitButton}
disabled={isDisabled}
disabled={Boolean(isDisabled)}
type="submit"
priority="high"
onKeyDown={handleEnterKeyPress}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const CurrentFilter = props => {
<span className={classes.root} data-cy="CurrentFilter-root">
<Trigger
action={handleClick}
ariaLabel={ariaLabel}
aria-label={ariaLabel}
data-cy="CurrentFilter-trigger"
>
<Icon size={20} src={Remove} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`#Newsletter display renders correctly 1`] = `
>
<label
className="label"
htmlFor="email"
htmlFor="emailNews"
>
Email
</label>
Expand All @@ -58,7 +58,7 @@ exports[`#Newsletter display renders correctly 1`] = `
<input
autoComplete="email"
className="input"
id="email"
id="emailNews"
name="email"
onBlur={[Function]}
onChange={[Function]}
Expand Down Expand Up @@ -126,7 +126,7 @@ exports[`#Newsletter submit displays an error message if the email already subsc
>
<label
className="label"
htmlFor="email"
htmlFor="emailNews"
>
Email
</label>
Expand All @@ -145,7 +145,7 @@ exports[`#Newsletter submit displays an error message if the email already subsc
<input
autoComplete="email"
className="input"
id="email"
id="emailNews"
name="email"
onBlur={[Function]}
onChange={[Function]}
Expand Down
4 changes: 2 additions & 2 deletions packages/venia-ui/lib/components/Newsletter/newsletter.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Newsletter = props => {
onSubmit={handleSubmit}
>
<Field
id="email"
id="emailNews"
label={formatMessage({
id: 'global.email',
defaultMessage: 'Email'
Expand All @@ -105,7 +105,7 @@ const Newsletter = props => {
<TextInput
autoComplete="email"
field="email"
id="email"
id="emailNews"
validate={isRequired}
/>
</Field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
>
<label
className="label"
htmlFor="email"
htmlFor="emailSignIn"
>
Email address
</label>
Expand All @@ -57,7 +57,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
aria-label="Email Required"
autoComplete="email"
className="input"
id="email"
id="emailSignIn"
name="email"
onBlur={[Function]}
onChange={[Function]}
Expand Down Expand Up @@ -169,7 +169,7 @@ exports[`renders correctly 1`] = `
>
<label
className="label"
htmlFor="email"
htmlFor="emailSignIn"
>
Email address
</label>
Expand All @@ -189,7 +189,7 @@ exports[`renders correctly 1`] = `
aria-label="Email Required"
autoComplete="email"
className="input"
id="email"
id="emailSignIn"
name="email"
onBlur={[Function]}
onChange={[Function]}
Expand Down Expand Up @@ -301,7 +301,7 @@ exports[`renders prefilled form with initial values 1`] = `
>
<label
className="label"
htmlFor="email"
htmlFor="emailSignIn"
>
Email address
</label>
Expand All @@ -321,7 +321,7 @@ exports[`renders prefilled form with initial values 1`] = `
aria-label="Email Required"
autoComplete="email"
className="input"
id="email"
id="emailSignIn"
name="email"
onBlur={[Function]}
onChange={[Function]}
Expand Down
6 changes: 3 additions & 3 deletions packages/venia-ui/lib/components/SignIn/signIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ const SignIn = props => {
initialValues={initialValues && initialValues}
>
<Field
id="email"
id="emailSignIn"
label={formatMessage({
id: 'signIn.emailAddressText',
defaultMessage: 'Email address'
})}
>
<TextInput
id="email"
id="emailSignIn"
data-cy="SignIn-email"
autoComplete="email"
field="email"
Expand Down Expand Up @@ -124,7 +124,7 @@ const SignIn = props => {
type="submit"
onKeyDown={signinHandleEnterKeyPress}
data-cy="SignInButton-root_highPriority"
disabled={isBusy}
disabled={Boolean(isBusy)}
>
<FormattedMessage
id={'signIn.signInText'}
Expand Down