Skip to content

Commit 709acb7

Browse files
committed
fix(login): enhance form accessibility by adding autocomplete attributes to input fields
1 parent 0e82233 commit 709acb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dashboard/src/pages/login.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ export const Login: FC = () => {
189189
<span className="text-gray-600 dark:text-gray-400">{t('login.welcomeBack')}</span>
190190
</div>
191191
<div className="mx-auto w-full max-w-[300px] pt-4">
192-
<form onSubmit={handleSubmit(handleLogin)}>
192+
<form onSubmit={handleSubmit(handleLogin)} autoComplete="off">
193193
<div className="mt-4 flex flex-col gap-y-2">
194-
<Input className="py-5" placeholder={t('username')} {...register('username')} error={t(errors?.username?.message as string)} />
195-
<PasswordInput className="py-5" placeholder={t('password')} {...register('password')} error={t(errors?.password?.message as string)} />
194+
<Input className="py-5" placeholder={t('username')} autoComplete="username" {...register('username')} error={t(errors?.username?.message as string)} />
195+
<PasswordInput className="py-5" placeholder={t('password')} autoComplete="new-password" {...register('password')} error={t(errors?.password?.message as string)} />
196196
{((error && error.data) || (miniAppError && miniAppError.data)) && (
197197
<Alert className="mt-2" variant="destructive">
198198
<CircleAlertIcon size="18px" />

0 commit comments

Comments
 (0)