-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: Add accessibility labels to icon-only buttons in PasswordScreen #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d5e33f3
2426ce6
4ce78e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -113,17 +113,35 @@ function PasswordRow({ item, onEdit, onDelete }: { item: PasswordEntry; onEdit: | |||||
| {item.username ? <Text style={s.username}>{item.username}</Text> : null} | ||||||
| <View style={s.pwRow}> | ||||||
| <Text style={s.pw}>{revealed ? item.password : '••••••••'}</Text> | ||||||
| <TouchableOpacity onPress={() => setRevealed(r => !r)} style={s.eyeBtn}> | ||||||
| <TouchableOpacity | ||||||
| onPress={() => setRevealed(r => !r)} | ||||||
| style={s.eyeBtn} | ||||||
| accessible={true} | ||||||
| accessibilityRole="button" | ||||||
| accessibilityLabel={revealed ? "Hide password" : "Show password"} | ||||||
| > | ||||||
| <MaterialIcons name={revealed ? 'visibility-off' : 'visibility'} size={16} color={colors.textSub} /> | ||||||
| </TouchableOpacity> | ||||||
| </View> | ||||||
| {item.notes ? <Text style={s.notes}>{item.notes}</Text> : null} | ||||||
| </View> | ||||||
| <View style={s.actions}> | ||||||
| <TouchableOpacity style={s.editBtn} onPress={onEdit}> | ||||||
| <TouchableOpacity | ||||||
| style={s.editBtn} | ||||||
| onPress={onEdit} | ||||||
| accessible={true} | ||||||
| accessibilityRole="button" | ||||||
| accessibilityLabel="Edit password" | ||||||
| > | ||||||
| <MaterialIcons name="edit" size={17} color={colors.primary} /> | ||||||
| </TouchableOpacity> | ||||||
| <TouchableOpacity style={s.delBtn} onPress={onDelete}> | ||||||
| <TouchableOpacity | ||||||
| style={s.delBtn} | ||||||
| onPress={onDelete} | ||||||
| accessible={true} | ||||||
| accessibilityRole="button" | ||||||
| accessibilityLabel="Delete password" | ||||||
| > | ||||||
|
Comment on lines
+129
to
+144
|
||||||
| <MaterialIcons name="delete-outline" size={17} color="#EF4444" /> | ||||||
| </TouchableOpacity> | ||||||
| </View> | ||||||
|
|
@@ -327,7 +345,13 @@ export default function PasswordScreen() { | |||||
| secureTextEntry={!showPw} | ||||||
| autoCapitalize="none" | ||||||
| /> | ||||||
| <TouchableOpacity onPress={() => setShowPw(p => !p)} style={s.eyeModal}> | ||||||
| <TouchableOpacity | ||||||
| onPress={() => setShowPw(p => !p)} | ||||||
| style={s.eyeModal} | ||||||
| accessible={true} | ||||||
| accessibilityRole="button" | ||||||
| accessibilityLabel={showPw ? "Hide password" : "Show password"} | ||||||
|
||||||
| accessibilityLabel={showPw ? "Hide password" : "Show password"} | |
| accessibilityLabel={showPw ? t('hidePassword') : t('showPassword')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new accessibilityLabel strings are hardcoded in English ("Show/Hide password"). This screen already uses
useLanguage().t(...)and the app defaults to Italian, so screen readers will announce mixed-language UI. Please source these labels from the i18n translations (add dedicated keys if needed) and uset(...)here so they match the selected language.