Skip to content

Commit

Permalink
replace accessibilityRoles with CONST values
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jul 4, 2023
1 parent 24ae42a commit 7df963b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/AvatarWithDisplayName.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function AvatarWithDisplayName(props) {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
}}
accessibilityLabel={subtitle}
accessibilityRole="link"
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
>
<Text
style={[styles.optionAlternateText, styles.textLabelSupporting, styles.link]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function ImageRenderer(props) {
Navigation.navigate(route);
}}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
accessibilityRole="imagebutton"
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={props.translate('accessibilityHints.viewAttachment')}
>
<ThumbnailImage
Expand Down
2 changes: 0 additions & 2 deletions src/components/TextInput/TextInputLabel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, {PureComponent} from 'react';
import {Animated} from 'react-native';
import styles from '../../../styles/styles';
import {propTypes, defaultProps} from './TextInputLabelPropTypes';
import CONST from '../../../CONST';

class TextInputLabel extends PureComponent {
componentDidMount() {
Expand All @@ -16,7 +15,6 @@ class TextInputLabel extends PureComponent {
return (
<Animated.Text
pointerEvents="none"
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
ref={(el) => (this.label = el)}
style={[styles.textInputLabel, styles.textInputLabelDesktop, styles.textInputLabelTransformation(this.props.labelTranslateY, 0, this.props.labelScale)]}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ function WorkspaceMembersPage(props) {
<PressableWithFeedback
disabled={_.isEmpty(removableMembers)}
onPress={() => toggleAllUsers(removableMembers)}
accessibilityRole="checkbox"
accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
accessibilityState={{
checked: !_.isEmpty(removableMembers) && _.every(_.keys(removableMembers), (accountID) => _.contains(selectedEmployees, Number(accountID))),
}}
Expand Down

0 comments on commit 7df963b

Please sign in to comment.