Add timeout cleanup to password reset confirm page and improve accessibility attributes
- Added `useEffect` for proper timeout cleanup in `PasswordResetConfirmForm` to prevent memory leaks during unmount. - Enhanced form accessibility by adding `aria-required` attributes to all required fields for better screen reader compatibility. - Updated `IMPLEMENTATION_PLAN.md` to reflect completion of Password Reset Flow and associated quality metrics.
This commit is contained in:
@@ -210,6 +210,7 @@ export function PasswordResetConfirmForm({
|
||||
? 'new-password-error'
|
||||
: 'password-requirements'
|
||||
}
|
||||
aria-required="true"
|
||||
/>
|
||||
{form.formState.errors.new_password && (
|
||||
<p id="new-password-error" className="text-sm text-destructive">
|
||||
@@ -284,6 +285,7 @@ export function PasswordResetConfirmForm({
|
||||
? 'confirm-password-error'
|
||||
: undefined
|
||||
}
|
||||
aria-required="true"
|
||||
/>
|
||||
{form.formState.errors.confirm_password && (
|
||||
<p id="confirm-password-error" className="text-sm text-destructive">
|
||||
|
||||
@@ -157,6 +157,7 @@ export function PasswordResetRequestForm({
|
||||
{...form.register('email')}
|
||||
aria-invalid={!!form.formState.errors.email}
|
||||
aria-describedby={form.formState.errors.email ? 'email-error' : undefined}
|
||||
aria-required="true"
|
||||
/>
|
||||
{form.formState.errors.email && (
|
||||
<p id="email-error" className="text-sm text-destructive">
|
||||
|
||||
Reference in New Issue
Block a user