a11y label cleanup (#576)
This commit is contained in:
parent
0f68e6a6ff
commit
011baa78c1
12 changed files with 56 additions and 67 deletions
|
@ -75,9 +75,7 @@ export const CreateAccount = observer(
|
|||
<TouchableOpacity
|
||||
onPress={onPressBackInner}
|
||||
testID="backBtn"
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
accessibilityRole="button">
|
||||
<Text type="xl" style={pal.link}>
|
||||
Back
|
||||
</Text>
|
||||
|
@ -87,9 +85,7 @@ export const CreateAccount = observer(
|
|||
<TouchableOpacity
|
||||
testID="nextBtn"
|
||||
onPress={onPressNext}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go to next"
|
||||
accessibilityHint="Navigates to the next screen">
|
||||
accessibilityRole="button">
|
||||
{model.isProcessing ? (
|
||||
<ActivityIndicator />
|
||||
) : (
|
||||
|
|
|
@ -241,11 +241,7 @@ const ChooseAccountForm = ({
|
|||
</View>
|
||||
</TouchableOpacity>
|
||||
<View style={[s.flexRow, s.alignCenter, s.pl20, s.pr20]}>
|
||||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
<TouchableOpacity onPress={onPressBack} accessibilityRole="button">
|
||||
<Text type="xl" style={[pal.link, s.pl5]}>
|
||||
Back
|
||||
</Text>
|
||||
|
@ -454,11 +450,7 @@ const LoginForm = ({
|
|||
</View>
|
||||
) : undefined}
|
||||
<View style={[s.flexRow, s.alignCenter, s.pl20, s.pr20]}>
|
||||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
<TouchableOpacity onPress={onPressBack} accessibilityRole="button">
|
||||
<Text type="xl" style={[pal.link, s.pl5]}>
|
||||
Back
|
||||
</Text>
|
||||
|
@ -632,11 +624,7 @@ const ForgotPasswordForm = ({
|
|||
</View>
|
||||
) : undefined}
|
||||
<View style={[s.flexRow, s.alignCenter, s.pl20, s.pr20]}>
|
||||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
<TouchableOpacity onPress={onPressBack} accessibilityRole="button">
|
||||
<Text type="xl" style={[pal.link, s.pl5]}>
|
||||
Back
|
||||
</Text>
|
||||
|
@ -794,11 +782,7 @@ const SetNewPasswordForm = ({
|
|||
</View>
|
||||
) : undefined}
|
||||
<View style={[s.flexRow, s.alignCenter, s.pl20, s.pr20]}>
|
||||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
<TouchableOpacity onPress={onPressBack} accessibilityRole="button">
|
||||
<Text type="xl" style={[pal.link, s.pl5]}>
|
||||
Back
|
||||
</Text>
|
||||
|
|
|
@ -106,8 +106,8 @@ function LightboxInner({
|
|||
onPress={onPressLeft}
|
||||
style={[styles.btn, styles.leftBtn]}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to previous image in viewer">
|
||||
accessibilityLabel="Previous image"
|
||||
accessibilityHint="">
|
||||
<FontAwesomeIcon
|
||||
icon="angle-left"
|
||||
style={styles.icon}
|
||||
|
@ -120,8 +120,8 @@ function LightboxInner({
|
|||
onPress={onPressRight}
|
||||
style={[styles.btn, styles.rightBtn]}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go to next"
|
||||
accessibilityHint="Navigates to next image in viewer">
|
||||
accessibilityLabel="Next image"
|
||||
accessibilityHint="">
|
||||
<FontAwesomeIcon
|
||||
icon="angle-right"
|
||||
style={styles.icon}
|
||||
|
|
|
@ -183,8 +183,8 @@ export const PostThread = observer(function PostThread({
|
|||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
accessibilityLabel="Back"
|
||||
accessibilityHint="">
|
||||
<Text type="2xl" style={pal.link}>
|
||||
<FontAwesomeIcon
|
||||
icon="angle-left"
|
||||
|
@ -217,8 +217,8 @@ export const PostThread = observer(function PostThread({
|
|||
<TouchableOpacity
|
||||
onPress={onPressBack}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
accessibilityLabel="Back"
|
||||
accessibilityHint="">
|
||||
<Text type="2xl" style={pal.link}>
|
||||
<FontAwesomeIcon
|
||||
icon="angle-left"
|
||||
|
|
|
@ -458,8 +458,8 @@ const ProfileHeaderLoaded = observer(
|
|||
onPress={onPressBack}
|
||||
hitSlop={BACK_HITSLOP}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
accessibilityLabel="Back"
|
||||
accessibilityHint="">
|
||||
<View style={styles.backBtnWrapper}>
|
||||
<BlurView style={styles.backBtn} blurType="dark">
|
||||
<FontAwesomeIcon size={18} icon="angle-left" style={s.white} />
|
||||
|
@ -472,7 +472,7 @@ const ProfileHeaderLoaded = observer(
|
|||
onPress={onPressAvi}
|
||||
accessibilityRole="image"
|
||||
accessibilityLabel={`View ${view.handle}'s avatar`}
|
||||
accessibilityHint={`Opens ${view.handle}'s avatar in an image viewer`}>
|
||||
accessibilityHint="">
|
||||
<View
|
||||
style={[
|
||||
pal.view,
|
||||
|
|
|
@ -55,8 +55,9 @@ export function HeaderWithInput({
|
|||
onPress={onPressMenu}
|
||||
hitSlop={MENU_HITSLOP}
|
||||
style={styles.headerMenuBtn}
|
||||
accessibilityLabel="Go back"
|
||||
accessibilityHint="Navigates to the previous screen">
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Back"
|
||||
accessibilityHint="">
|
||||
<UserAvatar size={30} avatar={store.me.avatar} />
|
||||
</TouchableOpacity>
|
||||
<View
|
||||
|
@ -84,6 +85,8 @@ export function HeaderWithInput({
|
|||
onSubmitEditing={onSubmitQuery}
|
||||
autoFocus={true}
|
||||
accessibilityRole="search"
|
||||
accessibilityLabel="Search"
|
||||
accessibilityHint=""
|
||||
/>
|
||||
{query ? (
|
||||
<TouchableOpacity
|
||||
|
|
|
@ -62,12 +62,8 @@ export const ViewHeader = observer(function ({
|
|||
hitSlop={BACK_HITSLOP}
|
||||
style={canGoBack ? styles.backBtn : styles.backBtnWide}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={canGoBack ? 'Go back' : 'Go to menu'}
|
||||
accessibilityHint={
|
||||
canGoBack
|
||||
? 'Navigates to the previous screen'
|
||||
: 'Navigates to the menu'
|
||||
}>
|
||||
accessibilityLabel={canGoBack ? 'Back' : 'Menu'}
|
||||
accessibilityHint="">
|
||||
{canGoBack ? (
|
||||
<FontAwesomeIcon
|
||||
size={18}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue