@@ -166,10 +166,18 @@ const SignUp: React.FC = () => {
166166 < form onSubmit = { handleSubmit } className = "space-y-6" >
167167 < div >
168168 < div className = "relative" >
169+ < label htmlFor = "username" className = "sr-only" > Username</ label >
169170 < div className = "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" >
170171 < User className = "h-5 w-5 text-gray-400" />
171172 </ div >
172- < input type = "text" name = "username" placeholder = "Enter your username" value = { formData . username } onChange = { handleChange } required
173+ < input
174+ id = "username"
175+ type = "text"
176+ name = "username"
177+ placeholder = "Enter your username"
178+ value = { formData . username }
179+ onChange = { handleChange }
180+ required
173181 className = { `w-full pl-12 pr-4 py-4 rounded-2xl border focus:outline-none focus:ring-2 focus:ring-gray-400 focus:border-transparent transition-all duration-300 ${ mode === "dark" ? "bg-white/10 border-white/20 text-white placeholder-gray-400" : "bg-gray-100 border-gray-300 text-black placeholder-gray-400" } ` }
174182 />
175183 </ div >
@@ -178,10 +186,18 @@ const SignUp: React.FC = () => {
178186
179187 < div >
180188 < div className = "relative" >
189+ < label htmlFor = "email" className = "sr-only" > Email</ label >
181190 < div className = "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" >
182191 < Mail className = "h-5 w-5 text-gray-400" />
183192 </ div >
184- < input type = "email" name = "email" placeholder = "Enter your email" value = { formData . email } onChange = { handleChange } required
193+ < input
194+ id = "email"
195+ type = "email"
196+ name = "email"
197+ placeholder = "Enter your email"
198+ value = { formData . email }
199+ onChange = { handleChange }
200+ required
185201 className = { `w-full pl-12 pr-4 py-4 rounded-2xl border focus:outline-none focus:ring-2 focus:ring-gray-400 focus:border-transparent transition-all duration-300 ${ mode === "dark" ? "bg-white/10 border-white/20 text-white placeholder-gray-400" : "bg-gray-100 border-gray-300 text-black placeholder-gray-400" } ` }
186202 />
187203 </ div >
@@ -190,13 +206,25 @@ const SignUp: React.FC = () => {
190206
191207 < div >
192208 < div className = "relative" >
209+ < label htmlFor = "password" className = "sr-only" > Password</ label >
193210 < div className = "absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none" >
194211 < Lock className = "h-5 w-5 text-gray-400" />
195212 </ div >
196- < input type = { showPassword ? "text" : "password" } name = "password" placeholder = "Enter your password" value = { formData . password } onChange = { handleChange } required
213+ < input
214+ id = "password"
215+ type = { showPassword ? "text" : "password" }
216+ name = "password"
217+ placeholder = "Enter your password"
218+ value = { formData . password }
219+ onChange = { handleChange }
220+ required
197221 className = { `w-full pl-12 pr-12 py-4 rounded-2xl border focus:outline-none focus:ring-2 focus:ring-gray-400 focus:border-transparent transition-all duration-300 ${ mode === "dark" ? "bg-white/10 border-white/20 text-white placeholder-gray-400" : "bg-gray-100 border-gray-300 text-black placeholder-gray-400" } ` }
198222 />
199- < button type = "button" onClick = { ( ) => setShowPassword ( ! showPassword ) } aria-label = { showPassword ? "Hide password" : "Show password" } aria-pressed = { showPassword }
223+ < button
224+ type = "button"
225+ onClick = { ( ) => setShowPassword ( ! showPassword ) }
226+ aria-label = { showPassword ? "Hide password" : "Show password" }
227+ aria-pressed = { showPassword }
200228 className = { `absolute inset-y-0 right-0 pr-4 flex items-center transition-colors duration-200 ${ mode === "dark" ? "text-slate-400 hover:text-white" : "text-gray-500 hover:text-gray-800" } ` } >
201229 { showPassword ? < EyeOff className = "h-5 w-5" /> : < Eye className = "h-5 w-5" /> }
202230 </ button >
0 commit comments