From 8461900a7e2e10220c7f1e1e2adfa9eee6a5648f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 01:36:59 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20a11y=20labels?= =?UTF-8?q?=20and=20translate=20notepad=20placeholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added accessibility label and role to the clear note icon button - Added disabled accessibility state to the save button - Extracted the Italian notepad placeholder and translated it using i18n - Journaled the a11y findings Co-authored-by: TargetMisser <52361977+TargetMisser@users.noreply.github.com> --- .jules/palette.md | 3 +++ src/i18n/translations.ts | 4 ++-- src/screens/NotepadScreen.tsx | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .jules/palette.md 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}