Skip to content

Commit

Permalink
Feat/accessiibility slider and biometrics (#185)
Browse files Browse the repository at this point in the history
* Correctif accessibilité condition dutilisation


Signed-off-by: ClaudeArs <[email protected]>
  • Loading branch information
ClaudeArs authored Jan 8, 2025
1 parent e6d6e65 commit 5c34d8b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -832,4 +832,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: ceed3b0bd7ccc2be2dc6aeb4c03e653fd0e18591

COCOAPODS: 1.16.2
COCOAPODS: 1.13.0
5 changes: 3 additions & 2 deletions app/src/components/EventItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const EventItem = ({

const body = (
<Pressable
accessible={true}
accessibilityLabel={t('Global.View')}
accessibilityRole={'button'}
testID={testIdWithKey(`View${event.id}`)}
Expand All @@ -143,7 +144,7 @@ const EventItem = ({
setSelected?.({ id: event.id, deleteAction: handleDelete })
}}
>
<View style={[styles.container]} testID={testIdWithKey('NotificationListItem')}>
<View style={[styles.container]} testID={testIdWithKey('NotificationListItem')} accessible={true}>
{event.image}
<View style={styles.infoContainer}>
<Text style={[styles.headerText]} testID={testIdWithKey('HeaderText')}>
Expand Down Expand Up @@ -210,7 +211,7 @@ const EventItem = ({
setToastEnabled(true)
}
return (
<TouchableOpacity onPress={onDelete}>
<TouchableOpacity onPress={onDelete} accessibilityRole="button">
<View style={styles.rightAction}>
<MaterialCommunityIcon name={'trash-can-outline'} size={20} style={styles.rightActionIcon} />
<Text style={styles.rightActionText}>{t('Notifications.Dismiss')}</Text>
Expand Down
6 changes: 5 additions & 1 deletion app/src/components/Help/HelpCenterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ const HelpCenterButton = () => {
DeviceEventEmitter.emit(BCWalletEventTypes.ADD_HELP_PRESSED, paramData)
}, [])
return (
<TouchableOpacity style={styles.container} onPress={activateSlider}>
<TouchableOpacity
style={styles.container}
onPress={activateSlider}
accessibilityHint="Cliquez pour ouvrir la liste des options"
>
<Text style={styles.text}>{t('HelpCenter.Help')}</Text>
</TouchableOpacity>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ const AccordionItem = ({
})

return (
<View style={[styles.container, containerStyle]}>
<Pressable onPress={() => toggleListItem()} testID={testID}>
<View>
<Pressable
onPress={() => toggleListItem()}
testID={testID}
style={[styles.container, containerStyle]}
accessibilityRole="button"
accessibilityState={{ expanded: showContent }}
>
<View style={styles.titleContainer}>
{(!isRTL || I18nManager.isRTL) && customTitle()}
{!customIcon ? (
Expand Down
3 changes: 3 additions & 0 deletions app/src/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ const translation = {
OpenSettings: 'Open settings',
},
Biometry: {
On: 'Biometrics unabled',
Off: 'Biometrics disabled',
Toggle: 'Toggle Biometrics',
EnabledText1: " Log in with your phone's biometrics instead of your wallet PIN.",
EnabledText1Bold:
Expand Down Expand Up @@ -971,6 +973,7 @@ const translation = {
Help: 'Help',
ButtonHelpCenter: 'Return to Help Center',
ConsultHelpCenter: 'Consult the help center',
OptionsList: 'Click to open the list of options',
},
About: {
Accessibility: 'Accessibility',
Expand Down
7 changes: 4 additions & 3 deletions app/src/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ const translation = {
OpenSettings: 'Ourvir Paramètres',
},
Biometry: {
On: 'Biométrie activée',
Off: 'Biométrie désactivée',
Toggle: 'Activer la biométrie',
EnabledText1:
'Déverrouillez votre portefeuille avec la biométrie de votre appareil au lieu d’utiliser le NIP du portefeuille.',
Expand Down Expand Up @@ -997,13 +999,12 @@ const translation = {
},
AddCredentialSlider: {
Choose: 'Choisir',
ScanQRCode: 'Balayer un code QR',
Title: 'Ajouter une attestation',
ScanQRCode: 'Lire un code QR',
},
HelpCenter: {
Help: 'Aide',
ButtonHelpCenter: "Revenir au centre d'aide",
ConsultHelpCenter: "Consulter le centre d'aide",
OptionsList: 'Cliquez pour ouvrir la liste des options',
},
About: {
Accessibility: 'Accessibilité',
Expand Down
2 changes: 1 addition & 1 deletion app/src/screens/UseBiometry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const UseBiometry: React.FC = () => {
<Pressable
testID={testIdWithKey('ToggleBiometrics')}
accessible
accessibilityLabel={t('Biometry.Toggle')}
accessibilityLabel={biometryEnabled ? t('Biometry.On') : t('Biometry.Off')}
accessibilityRole={'switch'}
>
<Switch
Expand Down

0 comments on commit 5c34d8b

Please sign in to comment.