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

accessibility improvements for Search, My Settings, and New Chat #3285

Merged
merged 5 commits into from
Jun 3, 2021
Merged
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
2 changes: 2 additions & 0 deletions src/components/FAB/FAB.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class FAB extends PureComponent {

return (
<AnimatedPressable
accessibilityLabel={this.props.accessibilityLabel}
accessibilityRole={this.props.accessibilityRole}
onPress={this.props.onPress}
style={[
styles.floatingActionButton,
Expand Down
4 changes: 4 additions & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export default {
sidebarScreen: {
newChat: 'New Chat',
newGroup: 'New Group',
headerChat: 'Chats',
buttonSearch: 'Search',
buttonMySettings: 'My Settings',
fabNewChat: 'New Chat(Floating Action)',
TwizzyIndy marked this conversation as resolved.
Show resolved Hide resolved
},
iou: {
amount: 'Amount',
Expand Down
13 changes: 12 additions & 1 deletion src/pages/home/sidebar/SidebarLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import KeyboardSpacer from '../../../components/KeyboardSpacer';
import CONST from '../../../CONST';
import {participantPropTypes} from './optionPropTypes';
import themeColors from '../../../styles/themes/default';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';


const propTypes = {
/** Toggles the navigation menu open and closed */
Expand Down Expand Up @@ -74,6 +76,8 @@ const propTypes = {

// Whether we are syncing app data
isSyncingData: PropTypes.bool,

...withLocalizePropTypes,
};

const defaultProps = {
Expand Down Expand Up @@ -132,16 +136,22 @@ class SidebarLinks extends React.Component {
>
<Header
textSize="large"
title="Chats"
title={this.props.translate('sidebarScreen.headerChat')}
accessibilityLabel={this.props.translate('sidebarScreen.headerChat')}
accessibilityRole="text"
shouldShowEnvironmentBadge
/>
<TouchableOpacity
accessibilityLabel={this.props.translate('sidebarScreen.buttonSearch')}
accessibilityRole="button"
style={[styles.flexRow, styles.ph5]}
onPress={this.showSearchPage}
>
<Icon src={MagnifyingGlass} />
</TouchableOpacity>
<TouchableOpacity
accessibilityLabel={this.props.translate('sidebarScreen.buttonMySettings')}
accessibilityRole="button"
onPress={this.props.onAvatarClick}
>
<AvatarWithIndicator
Expand Down Expand Up @@ -180,6 +190,7 @@ SidebarLinks.propTypes = propTypes;
SidebarLinks.defaultProps = defaultProps;

export default compose(
withLocalize,
withOnyx({
reports: {
key: ONYXKEYS.COLLECTION.REPORT,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/sidebar/SidebarScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class SidebarScreen extends Component {
isSmallScreenWidth={this.props.isSmallScreenWidth}
/>
<FAB
accessibilityLabel={this.props.translate('sidebarScreen.fabNewChat')}
accessibilityRole="menu"
isActive={this.state.isCreateMenuActive}
onPress={this.toggleCreateMenu}
/>
Expand Down