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

Add missing accessibility labels #5390

Merged
merged 5 commits into from Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions components/AmountInput.js
Expand Up @@ -289,6 +289,7 @@ class AmountInput extends Component {
{!disabled && amount !== BitcoinUnit.MAX && (
<TouchableOpacity
accessibilityRole="button"
accessibilityLabel={loc._.change_input_currency}
testID="changeAmountUnitButton"
style={styles.changeAmountUnit}
onPress={this.changeAmountUnit}
Expand Down
2 changes: 1 addition & 1 deletion components/TransactionsNavigationHeader.js
Expand Up @@ -260,7 +260,7 @@ export default class TransactionsNavigationHeader extends Component {
</TouchableOpacity>
)}
{this.state.wallet.type === LightningLdkWallet.type && (
<TouchableOpacity accessibilityRole="button" onPress={this.manageFundsPressed}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc.lnd.title} onPress={this.manageFundsPressed}>
<View style={styles.manageFundsButton}>
<Text style={styles.manageFundsButtonText}>{loc.lnd.title}</Text>
</View>
Expand Down
7 changes: 3 additions & 4 deletions components/navigationStyle.tsx
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.

Check failure on line 1 in components/navigationStyle.tsx

View workflow job for this annotation

GitHub Actions / test

Cannot find name 'loc'.
import React from 'react';
import { Image, Keyboard, TouchableOpacity, StyleSheet } from 'react-native';
import { Theme } from './themes';
Expand Down Expand Up @@ -56,7 +56,8 @@
navigation.goBack(null);
};
headerRight = () => (
<TouchableOpacity accessibilityRole="button" style={styles.button} onPress={handleClose} testID="NavigationCloseButton">
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.close} style={styles.button} onPress={handleClose} testID="NavigationCloseButton"
>
<Image source={theme.closeImage} />
</TouchableOpacity>
);
Expand Down Expand Up @@ -106,9 +107,7 @@
headerBackTitleVisible: false,
headerTintColor: theme.colors.foregroundColor,
headerLeft: () => (
<TouchableOpacity
accessibilityRole="button"
style={styles.button}
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.close} style={styles.button}
onPress={() => {
Keyboard.dismiss();
navigation.goBack(null);
Expand Down
8 changes: 7 additions & 1 deletion loc/en.json
Expand Up @@ -18,7 +18,13 @@
"wallet_key": "Wallet key",
"invalid_animated_qr_code_fragment": "Invalid animated QRCode fragment. Please try again.",
"file_saved": "File {filePath} has been saved in your {destination}.",
"downloads_folder": "Downloads Folder"
"downloads_folder": "Downloads Folder",
"close": "Close",
"change_input_currency": "Change input currency",
"refresh": "Refresh",
"more": "More",
"pick_image": "Choose image from library",
"pick_file": "Choose a file"
},
"alert": {
"default": "Alert"
Expand Down
6 changes: 3 additions & 3 deletions screen/send/ScanQRCode.js
Expand Up @@ -344,14 +344,14 @@ const ScanQRCode = () => {
<BlueButton title={loc.send.open_settings} onPress={openPrivacyDesktopSettings} />
</View>
)}
<TouchableOpacity style={styles.closeTouch} onPress={dismiss}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.close} style={styles.closeTouch} onPress={dismiss}>
<Image style={styles.closeImage} source={require('../../img/close-white.png')} />
</TouchableOpacity>
<TouchableOpacity style={styles.imagePickerTouch} onPress={showImagePicker}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.pick_image} style={styles.imagePickerTouch} onPress={showImagePicker}>
<Icon name="image" type="font-awesome" color="#ffffff" />
</TouchableOpacity>
{showFileImportButton && (
<TouchableOpacity style={styles.filePickerTouch} onPress={showFilePicker}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.pick_file} style={styles.filePickerTouch} onPress={showFilePicker}>
<Icon name="file-import" type="font-awesome-5" color="#ffffff" />
</TouchableOpacity>
)}
Expand Down
6 changes: 3 additions & 3 deletions screen/wallets/list.js
Expand Up @@ -103,13 +103,13 @@ const WalletsList = () => {
},
headerRight: () =>
I18nManager.isRTL ? null : (
<TouchableOpacity accessibilityRole="button" testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.more} testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<Icon size={22} name="more-horiz" type="material" color={colors.foregroundColor} />
</TouchableOpacity>
),
headerLeft: () =>
I18nManager.isRTL ? (
<TouchableOpacity accessibilityRole="button" testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.more} testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<Icon size={22} name="more-horiz" type="material" color={colors.foregroundColor} />
</TouchableOpacity>
) : null,
Expand Down Expand Up @@ -177,7 +177,7 @@ const WalletsList = () => {
{`${loc.transactions.list_title}${' '}`}
</Text>
{isDesktop && (
<TouchableOpacity accessibilityRole="button" style={style} onPress={() => refreshTransactions(true)} disabled={isLoading}>
<TouchableOpacity accessibilityRole="button" accessibilityLabel={loc._.refresh} style={style} onPress={() => refreshTransactions(true)} disabled={isLoading}>
<Icon name="refresh" type="font-awesome" color={colors.feeText} />
</TouchableOpacity>
)}
Expand Down