diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 0000000..3ad12b4 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-04-19 - Accessibility roles and labels on icon buttons +**Learning:** Found several generic icon-only `` buttons that are missing `accessibilityLabel` and `accessibilityRole`. This is a classic accessibility issue in React Native, leading to screen readers announcing "button" without context, or worse, just "clickable". For example, the `clear` button in NotepadScreen has no label. +**Action:** Add `accessible={true}`, `accessibilityRole="button"`, and `accessibilityLabel` to icon-only buttons to make them screen-reader friendly. diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index 8ccd1e2..8944505 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -39,7 +39,7 @@ const it = { notepadUnsaved: 'Modifiche non salvate', notepadChars: 'caratteri', notepadClearTitle: 'Cancella note', notepadClearMsg: 'Sei sicuro di voler cancellare tutte le note?', - notepadClearConfirm: 'Cancella', notepadPlaceholder: 'Inizia a scrivere...', + notepadClearConfirm: 'Cancella', notepadPlaceholder: 'Scrivi qui le tue note...\n\nUsa questo blocco note per:\n• Annotazioni di turno\n• Promemoria procedure\n• Note personali', // TravelDoc traveldocSub: 'Verifica documenti di viaggio', traveldocLoading: 'Caricamento TravelDoc…', @@ -197,7 +197,7 @@ const en: typeof it = { notepadUnsaved: 'Unsaved changes', notepadChars: 'characters', notepadClearTitle: 'Clear notes', notepadClearMsg: 'Are you sure you want to clear all notes?', - notepadClearConfirm: 'Clear', notepadPlaceholder: 'Start writing...', + notepadClearConfirm: 'Clear', notepadPlaceholder: 'Write your notes here...\n\nUse this notepad for:\n• Shift annotations\n• Procedure reminders\n• Personal notes', // TravelDoc traveldocSub: 'Travel document check', traveldocLoading: 'Loading TravelDoc…', diff --git a/src/screens/NotepadScreen.tsx b/src/screens/NotepadScreen.tsx index 9114a9e..ad24b60 100644 --- a/src/screens/NotepadScreen.tsx +++ b/src/screens/NotepadScreen.tsx @@ -109,12 +109,12 @@ export default function NotepadScreen() { {t('notepadTitle')} - + {saved ? t('notepadSaved') : t('notepadSave')} @@ -137,7 +137,7 @@ export default function NotepadScreen() { multiline value={text} onChangeText={handleChange} - placeholder={'Scrivi qui le tue note...\n\nUsa questo blocco note per:\n• Annotazioni di turno\n• Promemoria procedure\n• Note personali'} + placeholder={t('notepadPlaceholder')} placeholderTextColor={colors.textSub} textAlignVertical="top" autoCorrect={false}