@@ -113,6 +113,14 @@ function SignupForm() {
113113 { t ( 'SignupForm.Password' ) }
114114 </ label >
115115 < div className = "form__field__password" >
116+ < input
117+ className = "form__input"
118+ aria-label = { t ( 'SignupForm.PasswordARIA' ) }
119+ type = { showPassword ? 'text' : 'password' }
120+ id = "password"
121+ autoComplete = "new-password"
122+ { ...field . input }
123+ />
116124 < button
117125 className = "form__eye__icon"
118126 type = "button"
@@ -125,14 +133,6 @@ function SignupForm() {
125133 < AiOutlineEye />
126134 ) }
127135 </ button >
128- < input
129- className = "form__input"
130- aria-label = { t ( 'SignupForm.PasswordARIA' ) }
131- type = { showPassword ? 'text' : 'password' }
132- id = "password"
133- autoComplete = "new-password"
134- { ...field . input }
135- />
136136 </ div >
137137 { field . meta . touched && field . meta . error && (
138138 < span className = "form-error" aria-live = "polite" >
@@ -149,6 +149,14 @@ function SignupForm() {
149149 { t ( 'SignupForm.ConfirmPassword' ) }
150150 </ label >
151151 < div className = "form__field__password" >
152+ < input
153+ className = "form__input"
154+ type = { showConfirmPassword ? 'text' : 'password' }
155+ aria-label = { t ( 'SignupForm.ConfirmPasswordARIA' ) }
156+ id = "confirmPassword" // Match the id with htmlFor
157+ autoComplete = "new-password"
158+ { ...field . input }
159+ />
152160 < button
153161 className = "form__eye__icon"
154162 type = "button"
@@ -161,14 +169,6 @@ function SignupForm() {
161169 < AiOutlineEye />
162170 ) }
163171 </ button >
164- < input
165- className = "form__input"
166- type = { showConfirmPassword ? 'text' : 'password' }
167- aria-label = { t ( 'SignupForm.ConfirmPasswordARIA' ) }
168- id = "confirmPassword" // Match the id with htmlFor
169- autoComplete = "new-password"
170- { ...field . input }
171- />
172172 </ div >
173173 { field . meta . touched && field . meta . error && (
174174 < span className = "form-error" aria-live = "polite" >
0 commit comments