mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 16:26:57 +08:00
🎨 Palette: Improve LoginPage accessibility
- Added aria-label and aria-pressed to the password visibility toggle in LoginPage. - Added showPassword and hidePassword translations to both English and Chinese. - Ensured changes are micro and focused on accessibility. Co-authored-by: tinkle-community <240652709+tinkle-community@users.noreply.github.com>
This commit is contained in:
@@ -334,6 +334,8 @@ export function LoginPage() {
|
||||
type="button"
|
||||
onClick={() => setShowPassword(!showPassword)}
|
||||
className="absolute right-3 top-1/2 -translate-y-1/2 text-zinc-600 hover:text-zinc-400 transition-colors"
|
||||
aria-label={showPassword ? t('hidePassword', language) : t('showPassword', language)}
|
||||
aria-pressed={showPassword}
|
||||
>
|
||||
{showPassword ? <EyeOff size={16} /> : <Eye size={16} />}
|
||||
</button>
|
||||
|
||||
@@ -667,6 +667,8 @@ export const translations = {
|
||||
passwordRequired: 'Password is required',
|
||||
invalidEmail: 'Invalid email format',
|
||||
passwordTooShort: 'Password must be at least 6 characters',
|
||||
showPassword: 'Show password',
|
||||
hidePassword: 'Hide password',
|
||||
|
||||
// Landing Page
|
||||
features: 'Features',
|
||||
@@ -1834,6 +1836,8 @@ export const translations = {
|
||||
passwordRequired: '请输入密码',
|
||||
invalidEmail: '邮箱格式不正确',
|
||||
passwordTooShort: '密码至少需要6个字符',
|
||||
showPassword: '显示密码',
|
||||
hidePassword: '隐藏密码',
|
||||
|
||||
// Landing Page
|
||||
features: '功能',
|
||||
|
||||
Reference in New Issue
Block a user