diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 0000000..d9f5ac6 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-15 - React Native Icon-Only Buttons Accessibility +**Learning:** React Native's `` doesn't automatically act as a button with an implicit accessible name when it only contains an icon. It needs explicit `accessible={true}`, `accessibilityRole="button"`, and a localized `accessibilityLabel`. +**Action:** Always add ARIA-equivalent accessibility props (`accessible={true}`, `accessibilityRole="button"`, `accessibilityLabel="..."`) to icon-only buttons in React Native. diff --git a/App.tsx b/App.tsx index 63cdb27..efe4ca2 100644 --- a/App.tsx +++ b/App.tsx @@ -193,11 +193,11 @@ function AppInner() { > {overlay ? ( - + ) : ( - setDrawerOpen(true)} style={styles.iconBtn}> + setDrawerOpen(true)} style={styles.iconBtn}> )} diff --git a/src/components/DrawerMenu.tsx b/src/components/DrawerMenu.tsx index e22e073..795315a 100644 --- a/src/components/DrawerMenu.tsx +++ b/src/components/DrawerMenu.tsx @@ -84,7 +84,7 @@ export default function DrawerMenu({ visible, onClose, onSelect }: Props) { style={styles.headerGradient} > - + diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index 8ccd1e2..e75e8e9 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -138,6 +138,7 @@ const it = { pinVerifyErr: 'Impossibile verificare il PIN. Riprova.', pinAccessEnable: 'Attiva protezione PIN', pinAccessDisable: 'Disattiva protezione PIN', // DrawerMenu + appBarBack: 'Indietro', appBarMenu: 'Menu', drawerClose: 'Chiudi menu', drawerNotepadTitle: 'Blocco Note', drawerNotepadSub: 'Note personali', drawerPhonebookTitle: 'Rubrica', @@ -295,6 +296,7 @@ const en: typeof it = { pinDisableBtn: 'Disable', pinErrMsg: 'Could not set PIN. Try again.', pinVerifyErr: 'Could not verify PIN. Try again.', pinAccessEnable: 'Enable PIN protection', pinAccessDisable: 'Disable PIN protection', + appBarBack: 'Back', appBarMenu: 'Menu', drawerClose: 'Close menu', // DrawerMenu drawerNotepadTitle: 'Notepad', drawerNotepadSub: 'Personal notes',