diff --git a/packages/legacy/core/App/components/buttons/ToggleButton.tsx b/packages/legacy/core/App/components/buttons/ToggleButton.tsx index dc6f41f8f6..79f2fe21f4 100644 --- a/packages/legacy/core/App/components/buttons/ToggleButton.tsx +++ b/packages/legacy/core/App/components/buttons/ToggleButton.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react' import { Pressable, Animated } from 'react-native' import Icon from 'react-native-vector-icons/MaterialIcons' import { useTheme } from '../../contexts/theme' +import { useTranslation } from 'react-i18next' interface ToggleButtonProps { isEnabled: boolean @@ -24,6 +25,7 @@ const ToggleButton: React.FC = ({ }) => { const { ColorPallet } = useTheme() const [toggleAnim] = useState(new Animated.Value(isEnabled ? 1 : 0)) + const { t } = useTranslation() useEffect(() => { Animated.timing(toggleAnim, { @@ -47,7 +49,7 @@ const ToggleButton: React.FC = ({ = ({ actions, onDismiss }) => { key={action.text} testID={testIdWithKey(action.text)} accessibilityLabel={testIdWithKey(action.text)} + accessibilityRole="button" style={styles.drawerRow} onPress={action.onPress} > diff --git a/packages/legacy/core/App/components/chat/ChatMessage.tsx b/packages/legacy/core/App/components/chat/ChatMessage.tsx index 85740b650e..b7ece6ff62 100644 --- a/packages/legacy/core/App/components/chat/ChatMessage.tsx +++ b/packages/legacy/core/App/components/chat/ChatMessage.tsx @@ -121,6 +121,7 @@ export const ChatMessage: React.FC = ({ messageProps }) => { {message.messageOpensCallbackType && ( { if (message.onDetails) message.onDetails() diff --git a/packages/legacy/core/App/components/inputs/CheckBoxRow.tsx b/packages/legacy/core/App/components/inputs/CheckBoxRow.tsx index 9a5a62276a..3127761d9f 100644 --- a/packages/legacy/core/App/components/inputs/CheckBoxRow.tsx +++ b/packages/legacy/core/App/components/inputs/CheckBoxRow.tsx @@ -46,6 +46,8 @@ const CheckBoxRow: React.FC = ({ = ({ contact, navigation } onPress={navigateToContact} testID={testIdWithKey('Contact')} accessibilityLabel={t('ContactDetails.AContact')} + accessibilityRole="button" > diff --git a/packages/legacy/core/App/components/misc/InfoBox.tsx b/packages/legacy/core/App/components/misc/InfoBox.tsx index c5a0494266..caef7a9659 100644 --- a/packages/legacy/core/App/components/misc/InfoBox.tsx +++ b/packages/legacy/core/App/components/misc/InfoBox.tsx @@ -223,6 +223,7 @@ const InfoBox: React.FC = ({ {message && !showDetails && (showDetailsInfo ?? true) && ( = ({ )} {showVersionFooter ? ( - + {`${t('Settings.Version')} ${getVersion()} (${getBuildNumber()})`} ) : null} diff --git a/packages/legacy/core/App/components/misc/NewQRView.tsx b/packages/legacy/core/App/components/misc/NewQRView.tsx index 20948f65b1..3fb03f44c5 100644 --- a/packages/legacy/core/App/components/misc/NewQRView.tsx +++ b/packages/legacy/core/App/components/misc/NewQRView.tsx @@ -327,7 +327,7 @@ const NewQRView: React.FC = ({ defaultToConnect, handleCodeScan, error, e )} - + = ({ onPress, active, iconName, title }) = style={styles.container} onPress={onPress} accessibilityLabel={title} + accessibilityRole="tab" testID={testIdWithKey(title)} > diff --git a/packages/legacy/core/App/components/misc/VerifierCredentialCard.tsx b/packages/legacy/core/App/components/misc/VerifierCredentialCard.tsx index ef2e575639..5054da6caa 100644 --- a/packages/legacy/core/App/components/misc/VerifierCredentialCard.tsx +++ b/packages/legacy/core/App/components/misc/VerifierCredentialCard.tsx @@ -139,7 +139,7 @@ const VerifierCredentialCard: React.FC = ({ language: i18n.language, } bundleResolver.resolveAllBundles(params).then((bundle) => { - setOverlay(o => ({ + setOverlay((o) => ({ ...o, ...bundle, brandingOverlay: bundle.brandingOverlay as BrandingOverlay, @@ -185,7 +185,7 @@ const VerifierCredentialCard: React.FC = ({ const [showImageModal, setShowImageModal] = useState(false) useEffect(() => { - setValue(v => formatIfDate(item.format, v)) + setValue((v) => formatIfDate(item.format, v)) }, [item.format]) return ( @@ -208,6 +208,7 @@ const VerifierCredentialCard: React.FC = ({ {isDataUrl(value) ? ( setShowImageModal(true)} > diff --git a/packages/legacy/core/App/components/modals/AppGuideModal.tsx b/packages/legacy/core/App/components/modals/AppGuideModal.tsx index 06e4a639da..aeb08c0d94 100644 --- a/packages/legacy/core/App/components/modals/AppGuideModal.tsx +++ b/packages/legacy/core/App/components/modals/AppGuideModal.tsx @@ -79,7 +79,7 @@ const AppGuideModal: React.FC = ({ }) return ( - + diff --git a/packages/legacy/core/App/components/record/Record.tsx b/packages/legacy/core/App/components/record/Record.tsx index 89fef2342b..0836f00bee 100644 --- a/packages/legacy/core/App/components/record/Record.tsx +++ b/packages/legacy/core/App/components/record/Record.tsx @@ -79,6 +79,7 @@ const Record: React.FC = ({ header, footer, fields, hideFieldValues testID={testIdWithKey('HideAll')} accessible={true} accessibilityLabel={t('Record.HideAll')} + accessibilityRole="button" > {t('Record.HideAll')} diff --git a/packages/legacy/core/App/components/record/RecordBinaryField.tsx b/packages/legacy/core/App/components/record/RecordBinaryField.tsx index b6ffd24cec..993b12d477 100644 --- a/packages/legacy/core/App/components/record/RecordBinaryField.tsx +++ b/packages/legacy/core/App/components/record/RecordBinaryField.tsx @@ -37,6 +37,7 @@ const RecordBinaryField: React.FC = ({ attributeValue, s accessibilityLabel={t('Record.Zoom')} testID={testIdWithKey('zoom')} onPress={() => setShowImageModal(true)} + accessibilityRole="imagebutton" > diff --git a/packages/legacy/core/App/components/record/RecordField.tsx b/packages/legacy/core/App/components/record/RecordField.tsx index 324169fad9..b5d5397540 100644 --- a/packages/legacy/core/App/components/record/RecordField.tsx +++ b/packages/legacy/core/App/components/record/RecordField.tsx @@ -107,6 +107,7 @@ const RecordField: React.FC = ({ = ({ children }) => { }) return ( - + {children} ) diff --git a/packages/legacy/core/App/components/tour/TourOverlay.tsx b/packages/legacy/core/App/components/tour/TourOverlay.tsx index 00edc84bdb..a853ee5d93 100644 --- a/packages/legacy/core/App/components/tour/TourOverlay.tsx +++ b/packages/legacy/core/App/components/tour/TourOverlay.tsx @@ -85,7 +85,11 @@ export const TourOverlay = (props: TourOverlayProps) => { }, [windowWidth, windowHeight]) return currentStep !== undefined ? ( - + - + {bgImage ? : null} diff --git a/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx b/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx index bc36f607b4..5a9e392b3c 100644 --- a/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx +++ b/packages/legacy/core/App/modules/openid/components/OpenIDCredentialCard.tsx @@ -227,6 +227,7 @@ const OpenIDCredentialCard: React.FC = ({ accessibilityLabel={`${display?.issuer.name ? `${t('Credentials.IssuedBy')} ${display?.issuer.name}` : ''}, ${t( 'Credentials.Credential' )}.`} + accessibilityRole="button" disabled={typeof onPress === 'undefined' ? true : false} onPress={onPress} style={[styles.container, style]} diff --git a/packages/legacy/core/App/screens/Language.tsx b/packages/legacy/core/App/screens/Language.tsx index a558a1a814..716799537a 100644 --- a/packages/legacy/core/App/screens/Language.tsx +++ b/packages/legacy/core/App/screens/Language.tsx @@ -67,7 +67,9 @@ const Language = () => { {value} = ({ navigation, templ style={style.card} onPress={() => navigation.navigate(Screens.ProofRequestDetails, { templateId: template.id, connectionId })} accessibilityLabel={t('Screens.ProofRequestDetails')} + accessibilityRole="button" testID={testIdWithKey('ProofRequestsCard')} > diff --git a/packages/legacy/core/App/screens/ProofChangeCredential.tsx b/packages/legacy/core/App/screens/ProofChangeCredential.tsx index 2bd1d6c6f5..c173c47986 100644 --- a/packages/legacy/core/App/screens/ProofChangeCredential.tsx +++ b/packages/legacy/core/App/screens/ProofChangeCredential.tsx @@ -153,6 +153,7 @@ const ProofChangeCredential: React.FC = ({ route, navigation } return ( changeCred(item.credId ?? '')} style={[item.credId === selectedCred ? styles.selectedCred : undefined, { marginBottom: 10 }]} diff --git a/packages/legacy/core/App/screens/ProofRequestUsageHistory.tsx b/packages/legacy/core/App/screens/ProofRequestUsageHistory.tsx index aabc45230a..3c41c4e92d 100644 --- a/packages/legacy/core/App/screens/ProofRequestUsageHistory.tsx +++ b/packages/legacy/core/App/screens/ProofRequestUsageHistory.tsx @@ -98,6 +98,7 @@ const ProofRequestUsageHistoryRecord: React.FC diff --git a/packages/legacy/core/App/screens/Settings.tsx b/packages/legacy/core/App/screens/Settings.tsx index 49038ab294..eb80c5fbe8 100644 --- a/packages/legacy/core/App/screens/Settings.tsx +++ b/packages/legacy/core/App/screens/Settings.tsx @@ -339,6 +339,7 @@ const Settings: React.FC = ({ navigation }) => { { const [store, dispatch] = useStore() - const [checked, setChecked] = useState(false) + const agreedToPreviousTerms = store.onboarding.didAgreeToTerms + const [checked, setChecked] = useState(agreedToPreviousTerms) const { t } = useTranslation() const navigation = useNavigation>() const { OnboardingTheme, TextTheme } = useTheme() const [Button] = useServices([TOKENS.COMP_BUTTON]) - const agreedToPreviousTerms = store.onboarding.didAgreeToTerms const onSubmitPressed = useCallback(() => { dispatch({ type: DispatchAction.DID_AGREE_TO_TERMS, payload: [{ DidAgreeToTerms: TermsVersion }], }) - if (!agreedToPreviousTerms) { + if (!(agreedToPreviousTerms && store.onboarding.didCreatePIN)) { navigation.navigate(Screens.CreatePIN) } else if (store.onboarding.postAuthScreens.length) { const screens: string[] = store.onboarding.postAuthScreens @@ -44,7 +44,7 @@ const Terms: React.FC = () => { dispatch({ type: DispatchAction.DID_COMPLETE_ONBOARDING, payload: [true] }) } } - }, [dispatch, agreedToPreviousTerms, navigation, store.onboarding.postAuthScreens]) + }, [dispatch, agreedToPreviousTerms, navigation, store.onboarding.postAuthScreens, store.onboarding.didCreatePIN]) const style = StyleSheet.create({ container: { ...OnboardingTheme.container, @@ -95,25 +95,27 @@ const Terms: React.FC = () => { est laborum. - {!agreedToPreviousTerms && ( - setChecked(!checked)} - /> + {!(agreedToPreviousTerms && store.authentication.didAuthenticate) && ( + + setChecked(!checked)} + /> + +