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

Update CONSTS to direct developers to use role instead of accessibilityRole #31590

Merged
merged 28 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
977257a
fix(ACCESSIBILITY_ROLE): Deprecate ACCESSIBLITY_ROLE
trevor-coleman Nov 17, 2023
0b1c973
fix(ACCESSIBILITY_ROLE): Add CONST.ROLE
trevor-coleman Nov 17, 2023
9fbda55
fix(ACCESSIBILITY_ROLE): fix formatting in JSDoc comment
trevor-coleman Nov 17, 2023
7743c4c
fix(ACCESSIBILITY_ROLE): redirect `role` props that point to `ACCESSI…
trevor-coleman Nov 17, 2023
30335de
fix(ACCESSIBILITY_ROLE): fix role attributes being passed invalid `im…
trevor-coleman Nov 17, 2023
ce403f1
fix(ACCESSIBILITY_ROLE): reset ADJUSTABLE TO 'adjustable'
trevor-coleman Nov 17, 2023
b72ac43
fix(ACCESSIBILITY_ROLE): set role prop to use CONST.ROLE instead of d…
trevor-coleman Nov 17, 2023
5811816
fix(ACCESSIBILITY_ROLE): set role prop to use CONST.ROLE instead of d…
trevor-coleman Nov 17, 2023
911c4b3
fix(ACCESSIBILITY_ROLE): set role prop to use CONST.ROLE instead of d…
trevor-coleman Nov 17, 2023
f3a8a4e
fix(ACCESSIBILITY_ROLE): set role props to use CONST.ROLE instead of …
trevor-coleman Nov 17, 2023
c2892ec
fix(ACCESSIBILITY_ROLE): replace reference to deprecatd CONST.ACCESSI…
trevor-coleman Nov 17, 2023
6931552
fix(ACCESSIBILITY_ROLE): replace accessibilityRole with role
trevor-coleman Nov 17, 2023
35eae47
fix(ACCESSIBILITY_ROLE): replace accessibilityRole with role
trevor-coleman Nov 17, 2023
de4b4c0
fix(ACCESSIBILITY_ROLE): replace accessibilityRole with role
trevor-coleman Nov 17, 2023
b60079b
prettier
trevor-coleman Nov 20, 2023
0639e66
Merge branch 'main' into trevorcoleman/accessibility-role
trevor-coleman Nov 20, 2023
2336f3b
Merge pull request #74 from infinitered/trevorcoleman/accessibility-role
trevor-coleman Nov 20, 2023
244f634
Merge remote-tracking branch 'upstream/main' into accessibility-role
trevor-coleman Nov 22, 2023
5da2a42
fix: remove empty checkbox.js
trevor-coleman Nov 27, 2023
c21a9c7
Merge remote-tracking branch 'upstream/main' into accessibility-role
trevor-coleman Nov 27, 2023
a4f0762
fix: remove accessibilityLabel
trevor-coleman Nov 27, 2023
cc18c93
fix: remove accessibilityLabel
trevor-coleman Nov 27, 2023
0c8e6b4
test commit
trevor-coleman Nov 27, 2023
1214c03
revert test commit
trevor-coleman Nov 27, 2023
fe947d3
Merge branch 'main' into accessibility-role
trevor-coleman Nov 28, 2023
6aff307
Merge remote-tracking branch 'origin/main' into accessibility-role
trevor-coleman Dec 4, 2023
054eb86
Merge remote-tracking branch 'upstream/main' into accessibility-role
trevor-coleman Dec 4, 2023
4ad45b3
Merge branch 'main' of github.com:Expensify/App into accessibility-role
trevor-coleman Dec 11, 2023
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
116 changes: 112 additions & 4 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2727,17 +2727,125 @@ const CONST = {
EXPENSIFY_LOGO_SIZE_RATIO: 0.22,
EXPENSIFY_LOGO_MARGIN_RATIO: 0.03,
},
/**
* Acceptable values for the `accessibilityRole` prop on react native components.
*
* **IMPORTANT:** Do not use with the `role` prop as it can cause errors.
*
* @deprecated ACCESSIBILITY_ROLE is deprecated. Please use CONST.ROLE instead.
*/
ACCESSIBILITY_ROLE: {
/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
BUTTON: 'button',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
LINK: 'link',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
MENUITEM: 'menuitem',
TEXT: 'presentation',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
TEXT: 'text',
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
RADIO: 'radio',
IMAGEBUTTON: 'img button',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
IMAGEBUTTON: 'imagebutton',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
CHECKBOX: 'checkbox',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
SWITCH: 'switch',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
ADJUSTABLE: 'adjustable',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
IMAGE: 'image',
},
/**
* Acceptable values for the `role` attribute on react native components.
*
* **IMPORTANT:** Not for use with the `accessibilityRole` prop, as it accepts different values, and new components
* should use the `role` prop instead.
*/
ROLE: {
/** Use for elements with important, time-sensitive information. */
ALERT: 'alert',
/** Use for elements that act as buttons. */
BUTTON: 'button',
/** Use for elements representing checkboxes. */
CHECKBOX: 'checkbox',
/** Use for elements that allow a choice from multiple options. */
COMBOBOX: 'combobox',
/** Use with scrollable lists to represent a grid layout. */
GRID: 'grid',
/** Use for section headers or titles. */
HEADING: 'heading',
/** Use for image elements. */
IMG: 'img',
/** Use for elements that navigate to other pages or content. */
LINK: 'link',
/** Use to identify a list of items. */
LIST: 'list',
/** Use for a list of choices or options. */
MENU: 'menu',
/** Use for a container of multiple menus. */
MENUBAR: 'menubar',
/** Use for items within a menu. */
MENUITEM: 'menuitem',
/** Use when no specific role is needed. */
NONE: 'none',
/** Use for elements that don't require a specific role. */
PRESENTATION: 'presentation',
/** Use for elements showing progress of a task. */
PROGRESSBAR: 'progressbar',
/** Use for radio buttons. */
RADIO: 'radio',
/** Use for groups of radio buttons. */
RADIOGROUP: 'radiogroup',
/** Use for scrollbar elements. */
SCROLLBAR: 'scrollbar',
/** Use for text fields that are used for searching. */
SEARCHBOX: 'searchbox',
/** Use for adjustable elements like sliders. */
SLIDER: 'slider',
/** Use for a button that opens a list of choices. */
SPINBUTTON: 'spinbutton',
/** Use for elements providing a summary of app conditions. */
SUMMARY: 'summary',
/** Use for on/off switch elements. */
SWITCH: 'switch',
ADJUSTABLE: 'slider',
IMAGE: 'img',
/** Use for tab elements in a tab list. */
TAB: 'tab',
/** Use for a list of tabs. */
TABLIST: 'tablist',
/** Use for timer elements. */
TIMER: 'timer',
/** Use for toolbars containing action buttons or components. */
TOOLBAR: 'toolbar',
},
TRANSLATION_KEYS: {
ATTACHMENT: 'common.attachment',
Expand Down
2 changes: 1 addition & 1 deletion src/components/AmountTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function AmountTextInput(props) {
blurOnSubmit={false}
selection={props.selection}
onSelectionChange={props.onSelectionChange}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
onKeyPress={props.onKeyPress}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function BaseAnchorForAttachmentsOnly(props) {
onPressOut={props.onPressOut}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
accessibilityLabel={fileName}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<AttachmentView
source={sourceURLWithAuth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ function BaseAnchorForCommentsOnly({onPressIn, onPressOut, href = '', rel = '',
}}
onPressIn={onPressIn}
onPressOut={onPressOut}
role={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
accessibilityLabel={href}
>
<Tooltip text={href}>
<Text
ref={(el) => (linkRef = el)}
style={StyleSheet.flatten([style, defaultTextStyle])}
role={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
hrefAttrs={{
rel,
target: isEmail || !linkProps.href ? '_self' : target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function CarouselItem({item, isFocused, onPress}) {
<PressableWithoutFeedback
style={[styles.attachmentRevealButtonContainer]}
onPress={onPress}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved
accessibilityLabel={item.file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, loadComplete, o
onPress={onPress}
disabled={loadComplete}
style={[styles.flex1, styles.flexRow, styles.alignSelfStretch]}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this throw a deprecation warning? If so, we should either not use it or remove the @deprecated comment from the const file where this is defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I covered this in the description:

Note: In the IMAGEBUTTON Case, I thought it was best to preserve the imagebutton role information even though it uses the deprecated ACCESSIBILITY_ROLE. This minimizes the number of changes, rather than try to decide on a case-by-case basis what an appropriate replacement would be. ACCESSIBILITY_ROLE.IMAGEBUTTON is marked as deprecated and so it will be flagged and can be cleaned up the next time someone touches that component. In the meantime, the accessibilityRole prop is still supported in react-native (and will be for a long time) so there shouldn't be any problems.

But if you have enough context for this component to suggest what the correct value should be then I can make the change here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I would rather clean it up quick then let it hang around. Would you be available for the cleanup as a follow up PR?

accessibilityLabel={file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function AttachmentViewImage({source, file, isAuthTokenRequired, isFocused, isUs
onPress={onPress}
disabled={loadComplete}
style={[styles.flex1, styles.flexRow, styles.alignSelfStretch]}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved
accessibilityLabel={file.name || translate('attachmentView.unknownFilename')}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AvatarCropModal/AvatarCropModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ function AvatarCropModal(props) {
onLayout={initializeSliderContainer}
onPressIn={(e) => runOnUI(sliderOnPress)(e.nativeEvent.locationX)}
accessibilityLabel="slider"
role={CONST.ACCESSIBILITY_ROLE.ADJUSTABLE}
role={CONST.ROLE.SLIDER}
>
<Slider
sliderValue={translateSlider}
Expand Down
4 changes: 2 additions & 2 deletions src/components/AvatarWithDisplayName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function AvatarWithDisplayName({
<PressableWithoutFeedback
onPress={showActorDetails}
accessibilityLabel={title}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
{shouldShowSubscriptAvatar ? (
<SubscriptAvatar
Expand Down Expand Up @@ -166,7 +166,7 @@ function AvatarWithDisplayName({
onPress={() => ReportUtils.navigateToDetailsPage(report)}
style={[styles.flexRow, styles.alignItemsCenter, styles.flex1]}
accessibilityLabel={title}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
{headerView}
</PressableWithoutFeedback>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AvatarWithImagePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function AvatarWithImagePicker({
<Tooltip text={translate('avatarWithImagePicker.editImage')}>
<PressableWithoutFeedback
onPress={() => setIsMenuVisible((prev) => !prev)}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved
accessibilityLabel={translate('avatarWithImagePicker.editImage')}
disabled={isAvatarCropModalOpen}
ref={anchorRef}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Badge({success = false, error = false, pressable = false, text, environ
<Wrapper
style={pressable ? wrapperStyles : wrapperStyles({focused: false, hovered: false, isDisabled: false, isScreenReaderActive: false, pressed: false})}
onPress={onPress}
role={pressable ? CONST.ACCESSIBILITY_ROLE.BUTTON : CONST.ACCESSIBILITY_ROLE.TEXT}
role={pressable ? CONST.ROLE.BUTTON : CONST.ROLE.PRESENTATION}
accessibilityLabel={pressable ? text : undefined}
aria-label={!pressable ? text : undefined}
accessible={false}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Banner({text, onClose, onPress, containerStyles, textStyles, shouldRend
<Tooltip text={translate('common.close')}>
<PressableWithFeedback
onPress={onClose}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.close')}
>
<Icon src={Expensicons.Close} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function Button(
]}
id={id}
accessibilityLabel={accessibilityLabel}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
hoverDimmingValue={1}
>
{renderContent()}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CollapsibleSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function CollapsibleSection({title, children}: CollapsibleSectionProps) {
<PressableWithFeedback
onPress={toggleSection}
style={[styles.pb4, styles.flexRow]}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
accessibilityLabel={title}
hoverDimmingValue={1}
pressDimmingValue={0.2}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CurrencySymbolButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}) {
<PressableWithoutFeedback
onPress={onCurrencyButtonPress}
accessibilityLabel={translate('common.selectCurrency')}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<Text style={styles.iouAmountText}>{currencySymbol}</Text>
</PressableWithoutFeedback>
Expand Down
2 changes: 1 addition & 1 deletion src/components/DatePicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function DatePicker({containerStyles, defaultValue, disabled, errorText, inputID
icon={Expensicons.Calendar}
label={label}
accessibilityLabel={label}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
value={value || selectedDate || ''}
placeholder={placeholder || translate('common.dateFormat')}
errorText={errorText}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmojiPicker/CategoryShortcutButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function CategoryShortcutButton(props) {
onHoverOut={() => setIsHighlighted(false)}
style={({pressed}) => [StyleUtils.getButtonBackgroundColorStyle(getButtonState(false, pressed)), styles.categoryShortcutButton, isHighlighted && styles.emojiItemHighlighted]}
accessibilityLabel={`emojiPicker.headers.${props.code}`}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<Icon
fill={theme.icon}
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmojiPicker/EmojiPickerButtonDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function EmojiPickerButtonDropdown(props) {
onPress={onPress}
id="emojiDropdownButton"
accessibilityLabel="statusEmoji"
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
{({hovered, pressed}) => (
<View style={styles.emojiPickerButtonDropdownContainer}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function EmojiPickerMenu(props) {
<TextInput
label={translate('common.search')}
accessibilityLabel={translate('common.search')}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
onChangeText={filterEmojis}
defaultValue=""
ref={searchInputRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function EmojiPickerMenu({preferredLocale, onEmojiSelected, preferredSkinTone, t
<TextInput
label={translate('common.search')}
accessibilityLabel={translate('common.search')}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
onChangeText={filterEmojis}
blurOnSubmit={filteredEmojis.length > 0}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmojiPicker/EmojiPickerMenuItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class EmojiPickerMenuItem extends PureComponent {
this.props.themeStyles.emojiItem,
]}
accessibilityLabel={this.props.emoji}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<Text style={[this.props.themeStyles.emojiText]}>{this.props.emoji}</Text>
</PressableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class EmojiPickerMenuItem extends PureComponent {
this.props.themeStyles.emojiItem,
]}
accessibilityLabel={this.props.emoji}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<Text style={[this.props.themeStyles.emojiText]}>{this.props.emoji}</Text>
</PressableWithoutFeedback>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmojiPicker/EmojiSkinToneList.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function EmojiSkinToneList(props) {
onPress={toggleIsSkinToneListVisible}
style={[styles.flexRow, styles.alignSelfCenter, styles.justifyContentStart, styles.alignItemsCenter]}
accessibilityLabel={props.translate('emojiPicker.skinTonePickerLabel')}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
>
<View style={[styles.emojiItem, styles.wAuto, styles.justifyContentCenter]}>
<Text style={[styles.emojiText, styles.ph2, styles.textNoWrap]}>{currentSkinTone.code}</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function ImageRenderer(props) {
ReportUtils.isArchivedRoom(report),
)
}
role={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
trevor-coleman marked this conversation as resolved.
Show resolved Hide resolved
accessibilityLabel={translate('accessibilityHints.viewAttachment')}
>
<ThumbnailImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function MentionUserRenderer(props) {
event.preventDefault();
Navigation.navigate(navigationRoute);
}}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
accessibilityLabel={`/${navigationRoute}`}
>
<UserDetailsTooltip
Expand All @@ -77,7 +77,7 @@ function MentionUserRenderer(props) {
>
<Text
style={[styles.link, _.omit(props.style, 'color'), StyleUtils.getMentionStyle(isOurMention), {color: StyleUtils.getMentionTextColor(isOurMention)}]}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.LINK}
role={CONST.ROLE.LINK}
testID="span"
href={`/${navigationRoute}`}
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const BasePreRenderer = forwardRef((props, ref) => {
onPressIn={props.onPressIn}
onPressOut={props.onPressOut}
onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))}
role={CONST.ACCESSIBILITY_ROLE.TEXT}
role={CONST.ROLE.PRESENTATION}
accessibilityLabel={props.translate('accessibilityHints.prestyledText')}
>
<View>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderWithBackButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function HeaderWithBackButton({
<PressableWithoutFeedback
onPress={onCloseButtonPress}
style={[styles.touchableButtonImage]}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
accessibilityLabel={translate('common.close')}
>
<Icon
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImageView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function ImageView({isAuthTokenRequired, url, fileName, onError}) {
}}
onPressIn={onContainerPressIn}
onPress={onContainerPress}
role={CONST.ACCESSIBILITY_ROLE.IMAGE}
role={CONST.ROLE.IMG}
accessibilityLabel={fileName}
>
<Image
Expand Down
Loading
Loading