Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(a11y): E2EEnterYourPasswordView #6010

Merged
merged 11 commits into from
Jan 13, 2025
2 changes: 1 addition & 1 deletion app/stacks/InsideStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const InsideStackNavigator = () => {
<InsideStack.Screen
name='E2EEnterYourPasswordStackNavigator'
component={E2EEnterYourPasswordStackNavigator}
options={{ headerShown: false }}
options={{ headerShown: false, presentation: 'modal', animation: 'slide_from_bottom' }}
/>
<InsideStack.Screen name='AttachmentView' component={AttachmentView} />
<InsideStack.Screen
Expand Down
22 changes: 17 additions & 5 deletions app/views/E2EEnterYourPasswordView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const styles = StyleSheet.create({
info: {
fontSize: 16,
lineHeight: 24,
marginVertical: 4,
marginTop: 24,
...sharedStyles.textRegular
}
});
Expand Down Expand Up @@ -66,7 +66,9 @@ const E2EEnterYourPasswordView = (): React.ReactElement => {

useLayoutEffect(() => {
navigation.setOptions({
headerLeft: () => <HeaderButton.CloseModal testID='e2e-enter-your-password-view-close' />,
headerLeft: () => (
<HeaderButton.CloseModal accessibilityLabel={I18n.t('Close')} testID='e2e-enter-your-password-view-close' />
),
title: I18n.t('Enter_E2EE_Password')
});
}, [navigation]);
Expand All @@ -82,18 +84,28 @@ const E2EEnterYourPasswordView = (): React.ReactElement => {
contentContainerStyle={sharedStyles.container}
keyboardVerticalOffset={128}>
<StatusBar />
<ScrollView {...scrollPersistTaps} style={sharedStyles.container} contentContainerStyle={sharedStyles.containerScrollView}>
<ScrollView
{...scrollPersistTaps}
style={sharedStyles.container}
contentContainerStyle={{ ...sharedStyles.containerScrollView, paddingTop: 24 }}>
<SafeAreaView style={{ backgroundColor: colors.surfaceRoom }} testID='e2e-enter-your-password-view'>
<FormTextInput
placeholder={I18n.t('Password')}
label={I18n.t('Password')}
returnKeyType='send'
secureTextEntry
onSubmitEditing={submit}
onChangeText={setPassword}
testID='e2e-enter-your-password-view-password'
textContentType='password'
containerStyle={{ marginBottom: 0 }}
/>
<Button
onPress={submit}
title={I18n.t('Confirm')}
disabled={!password}
testID='e2e-enter-your-password-view-confirm'
style={{ marginTop: 36 }}
/>
<Button onPress={submit} title={I18n.t('Confirm')} disabled={!password} testID='e2e-enter-your-password-view-confirm' />
<Text style={[styles.info, { color: colors.fontDefault }]}>{I18n.t('Enter_E2EE_Password_description')}</Text>
</SafeAreaView>
</ScrollView>
Expand Down
Loading