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: add accessibilityRole header to app guide/tour and screens #1389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ const EmptyListContacts: React.FC<EmptyListProps> = ({ navigation }) => {
return (
<View style={styles.container}>
<Assets.svg.contactBook fill={ListItems.emptyList.color} height={120} />
<Text style={[TextTheme.headingThree, styles.text, { marginTop: 30 }]}>{t('Contacts.EmptyList')}</Text>
<Text style={[TextTheme.headingThree, styles.text, { marginTop: 30 }]} accessibilityRole="header">
{t('Contacts.EmptyList')}
</Text>
<Text style={[ListItems.emptyList, styles.text]}>{t('Contacts.PeopleAndOrganizations')}</Text>
<Link style={styles.link} linkText={t('Contacts.WhatAreContacts')} onPress={navigateToWhatAreContacts} />
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const AppGuideModal: React.FC<AppGuideModalProps> = ({
<View style={styles.container}>
<View style={styles.headerContainer}>
<View style={styles.headerTextContainer}>
<Text style={styles.headerText} testID={testIdWithKey('HeaderText')}>
<Text style={styles.headerText} testID={testIdWithKey('HeaderText')} accessibilityRole="header">
{title}
</Text>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const CameraDisclosureModal: React.FC<CameraDisclosureModalProps> = ({ requestCa
)}
<SafeAreaView style={{ backgroundColor: ColorPallet.brand.modalPrimaryBackground }}>
<ScrollView style={styles.container}>
<Text style={TextTheme.modalHeadingOne} testID={testIdWithKey('AllowCameraUse')}>
<Text style={TextTheme.modalHeadingOne} testID={testIdWithKey('AllowCameraUse')} accessibilityRole="header">
{t('CameraDisclosure.AllowCameraUse')}
</Text>
<Text style={[TextTheme.modalNormal, styles.messageText]}>{t('CameraDisclosure.CameraDisclosure')}</Text>
Expand Down
7 changes: 6 additions & 1 deletion packages/legacy/core/App/components/tour/TourBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@ export function TourBox(props: TourBoxProps): ReactElement {
>
<View style={styles.headerContainer}>
<View style={styles.headerTextContainer}>
<Text allowFontScaling={false} style={styles.headerText} testID={testIdWithKey('HeaderText')}>
<Text
allowFontScaling={false}
style={styles.headerText}
testID={testIdWithKey('HeaderText')}
accessibilityRole="header"
>
{title}
</Text>
</View>
Expand Down
4 changes: 3 additions & 1 deletion packages/legacy/core/App/screens/Tours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ const Tours: React.FC = () => {
const { value, bool }: Option = option
return (
<View style={[styles.section, styles.sectionRow]}>
<Text style={TextTheme.title}>{value}</Text>
<Text style={TextTheme.title} accessibilityRole="header">
{value}
</Text>
<BouncyCheckbox
accessibilityLabel={value}
disableText
Expand Down
8 changes: 4 additions & 4 deletions packages/legacy/core/App/screens/WhatAreContacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const WhatAreContacts: React.FC<WhatAreContactsProps> = ({ navigation }) => {
})

const goToContactList = () => {
navigation
.getParent()
?.navigate(Stacks.ContactStack, { screen: Screens.Contacts })
navigation.getParent()?.navigate(Stacks.ContactStack, { screen: Screens.Contacts })
}

const bulletPoints = [
Expand All @@ -59,7 +57,9 @@ const WhatAreContacts: React.FC<WhatAreContactsProps> = ({ navigation }) => {
automaticallyAdjustContentInsets={false}
showsHorizontalScrollIndicator={false}
>
<Text style={styles.title}>{t('WhatAreContacts.Title')}</Text>
<Text style={styles.title} accessibilityRole="header">
{t('WhatAreContacts.Title')}
</Text>
<Text style={TextTheme.normal}>{t('WhatAreContacts.Preamble')}</Text>
{bulletPoints}
<Text style={TextTheme.normal}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports[`TourBox Component Renders properly with defaults 1`] = `
}
>
<Text
accessibilityRole="header"
allowFontScaling={false}
style={
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports[`CameraDisclosureModal Component Renders correctly 1`] = `
>
<View>
<Text
accessibilityRole="header"
style={
Object {
"color": "#FFFFFF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`WhatAreContacts Screen Renders correctly 1`] = `
>
<View>
<Text
accessibilityRole="header"
style={
Object {
"color": "#FFFFFF",
Expand Down