Skip to content

Commit 2a82fe4

Browse files
chore(a11y): E2EEnterYourPasswordView (#6010)
Co-authored-by: OtavioStasiak <[email protected]>
1 parent 625a700 commit 2a82fe4

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

app/stacks/InsideStack.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const InsideStackNavigator = () => {
310310
<InsideStack.Screen
311311
name='E2EEnterYourPasswordStackNavigator'
312312
component={E2EEnterYourPasswordStackNavigator}
313-
options={{ headerShown: false }}
313+
options={{ headerShown: false, presentation: 'modal', animation: 'slide_from_bottom' }}
314314
/>
315315
<InsideStack.Screen name='AttachmentView' component={AttachmentView} />
316316
<InsideStack.Screen

app/views/E2EEnterYourPasswordView.tsx

+17-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const styles = StyleSheet.create({
2323
info: {
2424
fontSize: 16,
2525
lineHeight: 24,
26-
marginVertical: 4,
26+
marginTop: 24,
2727
...sharedStyles.textRegular
2828
}
2929
});
@@ -66,7 +66,9 @@ const E2EEnterYourPasswordView = (): React.ReactElement => {
6666

6767
useLayoutEffect(() => {
6868
navigation.setOptions({
69-
headerLeft: () => <HeaderButton.CloseModal testID='e2e-enter-your-password-view-close' />,
69+
headerLeft: () => (
70+
<HeaderButton.CloseModal accessibilityLabel={I18n.t('Close')} testID='e2e-enter-your-password-view-close' />
71+
),
7072
title: I18n.t('Enter_E2EE_Password')
7173
});
7274
}, [navigation]);
@@ -82,18 +84,28 @@ const E2EEnterYourPasswordView = (): React.ReactElement => {
8284
contentContainerStyle={sharedStyles.container}
8385
keyboardVerticalOffset={128}>
8486
<StatusBar />
85-
<ScrollView {...scrollPersistTaps} style={sharedStyles.container} contentContainerStyle={sharedStyles.containerScrollView}>
87+
<ScrollView
88+
{...scrollPersistTaps}
89+
style={sharedStyles.container}
90+
contentContainerStyle={{ ...sharedStyles.containerScrollView, paddingTop: 24 }}>
8691
<SafeAreaView style={{ backgroundColor: colors.surfaceRoom }} testID='e2e-enter-your-password-view'>
8792
<FormTextInput
88-
placeholder={I18n.t('Password')}
93+
label={I18n.t('Password')}
8994
returnKeyType='send'
9095
secureTextEntry
9196
onSubmitEditing={submit}
9297
onChangeText={setPassword}
9398
testID='e2e-enter-your-password-view-password'
9499
textContentType='password'
100+
containerStyle={{ marginBottom: 0 }}
101+
/>
102+
<Button
103+
onPress={submit}
104+
title={I18n.t('Confirm')}
105+
disabled={!password}
106+
testID='e2e-enter-your-password-view-confirm'
107+
style={{ marginTop: 36 }}
95108
/>
96-
<Button onPress={submit} title={I18n.t('Confirm')} disabled={!password} testID='e2e-enter-your-password-view-confirm' />
97109
<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('Enter_E2EE_Password_description')}</Text>
98110
</SafeAreaView>
99111
</ScrollView>

0 commit comments

Comments
 (0)