Skip to content
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
14 changes: 5 additions & 9 deletions src/components/LHNOptionsList/OptionRowLHN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {StyleSheet, View} from 'react-native';
import DisplayNames from '@components/DisplayNames';
import Hoverable from '@components/Hoverable';
import Icon from '@components/Icon';
import * as Expensicons from '@components/Icon/Expensicons';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import {useSession} from '@components/OnyxListItemProvider';
import PressableWithSecondaryInteraction from '@components/PressableWithSecondaryInteraction';
Expand Down Expand Up @@ -61,7 +60,7 @@ function OptionRowLHN({
const popoverAnchor = useRef<View>(null);
const StyleUtils = useStyleUtils();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const expensifyIcons = useMemoizedLazyExpensifyIcons(['Pencil']);
const expensifyIcons = useMemoizedLazyExpensifyIcons(['Pencil', 'DotIndicator', 'Pin']);

const session = useSession();
const isOnboardingGuideAssigned = onboardingPurpose === CONST.ONBOARDING_CHOICES.MANAGE_TEAM && !session?.email?.includes('+');
Expand Down Expand Up @@ -335,22 +334,19 @@ function OptionRowLHN({
<View style={[styles.alignItemsCenter, styles.justifyContentCenter]}>
<Icon
testID="RBR Icon"
src={Expensicons.DotIndicator}
src={expensifyIcons.DotIndicator}
fill={theme.danger}
/>
</View>
)}
</View>
</View>
<View
style={[styles.flexRow, styles.alignItemsCenter]}
accessible={false}
>
<View style={[styles.flexRow, styles.alignItemsCenter]}>
{brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.INFO && (
<View style={styles.ml2}>
<Icon
testID="GBR Icon"
src={Expensicons.DotIndicator}
src={expensifyIcons.DotIndicator}
fill={theme.success}
/>
</View>
Expand All @@ -375,7 +371,7 @@ function OptionRowLHN({
<Icon
testID="Pin Icon"
fill={theme.icon}
src={Expensicons.Pin}
src={expensifyIcons.Pin}
/>
</View>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ function MoneyRequestReportPreviewContent({
<PressableWithFeedback
accessibilityRole="button"
accessible
accessibilityLabel="button"
accessibilityLabel={translate('common.previous')}
style={[styles.reportPreviewArrowButton, {backgroundColor: theme.buttonDefaultBG}]}
onPress={() => handleChange(currentIndex - 1)}
disabled={optimisticIndex !== undefined ? optimisticIndex === 0 : currentIndex === 0 && currentVisibleItems.at(0) === 0}
Expand All @@ -800,7 +800,7 @@ function MoneyRequestReportPreviewContent({
<PressableWithFeedback
accessibilityRole="button"
accessible
accessibilityLabel="button"
accessibilityLabel={translate('common.next')}
style={[styles.reportPreviewArrowButton, {backgroundColor: theme.buttonDefaultBG}]}
onPress={() => handleChange(currentIndex + 1)}
disabled={
Expand Down
2 changes: 1 addition & 1 deletion src/pages/inbox/report/PureReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ function PureReportActionItem({
preventDefaultContextMenu={draftMessage === undefined && !hasErrors}
withoutFocusOnSecondaryInteraction
accessibilityLabel={translate('accessibilityHints.chatMessage')}
accessible
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@shubham1206agra this is still a concern

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe this comment is for @kirillbilchenko

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in this case this property is by default equal to true, and removing it just removing unnecessary declaration

accessibilityRole={CONST.ROLE.BUTTON}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@kirillbilchenko Sorry for the late question, but why do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@shubham1206agra sure, from the guide https://github.com/Expensify/App/blob/main/contributingGuides/ACCESSIBILITY.md

ensure that the pressable component has a role. This is especially important for users with visual disabilities who rely on screen readers to navigate the app. All Pressable components have a accessibilityRole prop that can be used to set the role of the pressable component.

So chat message in the end is interactive element that user need press on to open context menu, and that's the reason

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line introduced multiple regressions.
#82095
#37447 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@situchan could be the case, but this is something mentioned in the guide, so in this case make sense to update the guide or add some additional information about this corner case. This is very good catch in the end, but I'm not sure how this can be prevented in future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@NJ-2020 by the way revert will not break this pr, this was added only because I was told to follow accessibility guide that we have in repo, and that's the only reason why it was added, I gave my explanation before, so maybe accessibilityRole={Platform.OS !== 'web' ? CONST.ROLE.BUTTON : undefined} adding fix like this can solve the issue, and worth to add comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

git bisect points to this line as the cause of this issue #86871

sentryLabel={CONST.SENTRY_LABEL.REPORT.PURE_REPORT_ACTION_ITEM}
>
<Hoverable
Expand Down
Loading