Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a3b4b81
fix: add accessibilityRole header to visual headings for screen readers
abbasifaizan70 Jan 26, 2026
5df9b8f
Reverted the changes to IOURequestStepDistanceManual.tsx from the las…
abbasifaizan70 Jan 26, 2026
31c48b5
fixed prettier issues
abbasifaizan70 Jan 26, 2026
a136a43
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Jan 29, 2026
f9293a6
Merge branch 'main' of https://github.com/abbasifaizan70/Expensify in…
abbasifaizan70 Jan 29, 2026
a1f74fb
Fixed feedbacks
abbasifaizan70 Feb 2, 2026
47251df
Merge branch '79241' of https://github.com/abbasifaizan70/Expensify i…
abbasifaizan70 Feb 2, 2026
6bb6c18
Fixed lint issues
abbasifaizan70 Feb 2, 2026
107f333
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Feb 2, 2026
3eed57d
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Feb 6, 2026
56fda9e
Merge branch 'main' into 79241
abbasifaizan70 Feb 10, 2026
e3575de
added header for accessibility role
abbasifaizan70 Feb 10, 2026
97400a3
removed extra code
abbasifaizan70 Feb 10, 2026
e60de20
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Feb 10, 2026
33af292
fixed eslint issues
abbasifaizan70 Feb 10, 2026
ceb5461
Fixed accessibility headers issue
abbasifaizan70 Feb 13, 2026
d9988e3
fixed prettier issues
abbasifaizan70 Feb 13, 2026
a7b5614
Fixed lint issues and merged main
abbasifaizan70 Feb 16, 2026
8a26f7d
fixed lint isseus
abbasifaizan70 Feb 16, 2026
8fbdc2b
Fixed lint issues
abbasifaizan70 Feb 16, 2026
be75958
fixed sentryLabel issues
abbasifaizan70 Feb 18, 2026
117930c
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Feb 18, 2026
542185f
Fixed lint issues
abbasifaizan70 Feb 18, 2026
2284c26
fixed prettier issue
abbasifaizan70 Feb 18, 2026
6943267
Merge branch 'main' into 79241
abbasifaizan70 Feb 18, 2026
2e7a96a
Fixed feedbacks
abbasifaizan70 Feb 18, 2026
1c57e8c
updated header text with CONST
abbasifaizan70 Feb 18, 2026
e84eab4
Merge branch 'Expensify:main' into 79241
abbasifaizan70 Feb 18, 2026
9b0d4f6
fixed eslint issue
abbasifaizan70 Feb 18, 2026
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
19 changes: 19 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5659,6 +5659,8 @@ const CONST = {
GRID: 'grid',
/** Use for section headers or titles. */
HEADING: 'heading',
/** Use for elements that serve as a page or section header (e.g. top bar title). */
HEADER: 'header',
/** Use for image elements. */
IMG: 'img',
/** Use for elements that navigate to other pages or content. */
Expand Down Expand Up @@ -8222,6 +8224,12 @@ const CONST = {
CLOSE_BUTTON: 'Header-CloseButton',
MORE_BUTTON: 'Header-MoreButton',
},
TOP_BAR: {
CANCEL_BUTTON: 'TopBar-CancelButton',
},
COLLAPSIBLE_SECTION: {
TOGGLE: 'CollapsibleSection-Toggle',
},
VIDEO_PLAYER: {
PLAY_PAUSE_BUTTON: 'VideoPlayer-PlayPauseButton',
FULLSCREEN_BUTTON: 'VideoPlayer-FullscreenButton',
Expand Down Expand Up @@ -8343,9 +8351,12 @@ const CONST = {
},
SELECTION_LIST: {
BASE_LIST_ITEM: 'SelectionList-BaseListItem',
SPLIT_LIST_ITEM_EDIT_BUTTON: 'SplitListItem-EditButton',
LIST_HEADER_SELECT_ALL: 'SelectionList-ListHeader-SelectAll',
},
SELECTION_LIST_WITH_SECTIONS: {
BASE_LIST_ITEM: 'SelectionListWithSections-BaseListItem',
SELECT_ALL: 'SelectionList-SelectAll',
},
CONTEXT_MENU: {
REPLY_IN_THREAD: 'ContextMenu-ReplyInThread',
Expand Down Expand Up @@ -8436,6 +8447,12 @@ const CONST = {
TRANSACTION_PREVIEW: {
CARD: 'TransactionPreview-Card',
},
TRANSACTION_ITEM_ROW: {
ARROW_RIGHT: 'TransactionItemRow-ArrowRight',
},
PAYMENT_METHOD_LIST_ITEM: {
CHASE_ACCOUNT_HELP: 'PaymentMethodListItem-ChaseAccountHelp',
},
EMOJI_PICKER: {
BUTTON: 'EmojiPicker-Button',
BUTTON_DROPDOWN: 'EmojiPicker-ButtonDropdown',
Expand Down Expand Up @@ -8568,6 +8585,7 @@ const CONST = {
WORKSPACE: {
TOGGLE_SETTINGS_ROW: 'Workspace-ToggleSettingsRow',
WORKSPACE_MENU_ITEM: 'Workspace-WorkspaceMenuItem',
INVITE_MESSAGE_PRIVACY_LINK: 'WorkspaceInviteMessage-PrivacyLink',
COMPANY_CARDS: {
TABLE_ITEM: 'Workspace-CompanyCards-TableItem',
MORE_DROPDOWN: 'WorkspaceCompanyCards-MoreDropdown',
Expand Down Expand Up @@ -8704,6 +8722,7 @@ const CONST = {
},
ONBOARDING: {
INTERESTED_FEATURES_ITEM: 'Onboarding-InterestedFeaturesItem',
ACCOUNTING_SELECT_INTEGRATION: 'OnboardingAccounting-SelectIntegration',
},
REPORT_HEADER_SKELETON: {
GO_BACK: 'ReportHeaderSkeleton-GoBack',
Expand Down
2 changes: 2 additions & 0 deletions src/components/CollapsibleSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ function CollapsibleSection({title, children, titleStyle, textStyle, wrapperStyl
style={[styles.pb4, styles.flexRow]}
role={CONST.ROLE.BUTTON}
accessibilityLabel={title}
sentryLabel={CONST.SENTRY_LABEL.COLLAPSIBLE_SECTION.TOGGLE}
hoverDimmingValue={1}
pressDimmingValue={0.2}
>
<Text
style={textStyle ?? [styles.flex1, styles.textStrong, styles.userSelectNone, titleStyle]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
accessibilityRole={CONST.ROLE.HEADER}
>
{title}
</Text>
Expand Down
7 changes: 6 additions & 1 deletion src/components/EmptyStateComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ function EmptyStateComponent({
<View style={[styles.emptyStateContent, cardStyles]}>
<View style={[styles.emptyStateHeader, styles.emptyStateHeaderPosition(headerMediaType === CONST.EMPTY_STATE_MEDIA.ILLUSTRATION), headerStyles]}>{HeaderComponent}</View>
<View style={[shouldUseNarrowLayout ? styles.p5 : styles.p8, cardContentStyles]}>
<Text style={[styles.textAlignCenter, styles.textHeadlineH1, styles.mb2, titleStyles]}>{title}</Text>
<Text
style={[styles.textAlignCenter, styles.textHeadlineH1, styles.mb2, titleStyles]}
accessibilityRole={CONST.ROLE.HEADER}
>
{title}
</Text>
{subtitleText ??
(doesSubtitleContainCustomEmojiAndMore ? (
<TextWithEmojiFragment
Expand Down
3 changes: 3 additions & 0 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, {useMemo} from 'react';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import {Linking, View} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import CONST from '@src/CONST';
import EnvironmentBadge from './EnvironmentBadge';
import Text from './Text';
import TextLink from './TextLink';
Expand Down Expand Up @@ -77,6 +78,8 @@ function Header({title = '', subtitle = '', textStyles = [], style, containerSty
<Text
numberOfLines={numberOfTitleLines}
style={[styles.headerText, styles.textLarge, styles.lineHeightXLarge, textStyles]}
accessibilityRole={CONST.ROLE.HEADER}
accessibilityLabel={title}
>
{title}
</Text>
Expand Down
5 changes: 5 additions & 0 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ type MenuItemBaseProps = ForwardedFSClassProps &
/** Accessibility label for the menu item */
accessibilityLabel?: string;

/** Optional accessibility role for the title. Only set when the title is a section heading (e.g. CONST.ROLE.HEADER); omit for regular menu items. */
titleAccessibilityRole?: typeof CONST.ROLE.HEADER;

/** Component to display as the title */
titleComponent?: ReactElement;

Expand Down Expand Up @@ -565,6 +568,7 @@ function MenuItem({
shouldBeAccessible = true,
tabIndex = 0,
rightIconWrapperStyle,
titleAccessibilityRole,
}: MenuItemProps) {
const icons = useMemoizedLazyExpensifyIcons(['ArrowRight', 'FallbackAvatar', 'DotIndicator', 'Checkmark']);
const theme = useTheme();
Expand Down Expand Up @@ -916,6 +920,7 @@ function MenuItem({
style={combinedTitleTextStyle}
numberOfLines={numberOfLinesTitle || undefined}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: interactive && disabled}}
accessibilityRole={titleAccessibilityRole}
>
{renderTitleContent()}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/NavigationTabBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function NavigationTabBar({selectedTab, isTopLevelBar = false, shouldShowFloatin
role={CONST.ROLE.TAB}
accessibilityLabel={translate('common.home')}
style={({hovered}) => [styles.leftNavigationTabBarItem, hovered && styles.navigationTabBarItemHovered]}
sentryLabel="NavigationTabBar.Home"
sentryLabel={CONST.SENTRY_LABEL.NAVIGATION_TAB_BAR.HOME}
>
{({hovered}) => (
<>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Navigation/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import SignInButton from '@pages/inbox/sidebar/SignInButton';
import {isAnonymousUser as isAnonymousUserUtil} from '@userActions/Session';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Session} from '@src/types/onyx';

Expand Down Expand Up @@ -51,6 +52,7 @@ function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpB
<Text
numberOfLines={1}
style={[styles.flexShrink1, styles.topBarLabel]}
accessibilityRole={CONST.ROLE.HEADER}
>
{breadcrumbLabel}
</Text>
Expand All @@ -62,6 +64,7 @@ function TopBar({breadcrumbLabel, shouldDisplaySearch = true, shouldDisplayHelpB
<PressableWithoutFeedback
accessibilityLabel={translate('common.cancel')}
style={styles.textBlue}
sentryLabel={CONST.SENTRY_LABEL.TOP_BAR.CANCEL_BUTTON}
onPress={() => {
cancelSearch();
}}
Expand Down
12 changes: 11 additions & 1 deletion src/components/Section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import isIllustrationLottieAnimation from '@libs/isIllustrationLottieAnimation';
import CONST from '@src/CONST';
import type ChildrenProps from '@src/types/utils/ChildrenProps';
import type IconAsset from '@src/types/utils/IconAsset';
import IconSection from './IconSection';
Expand Down Expand Up @@ -186,7 +187,16 @@ function Section({
/>
)}
<View style={[styles.flexShrink1, styles.w100]}>
{renderTitle ? renderTitle() : !!title && <Text style={[styles.textHeadline, styles.cardSectionTitle, titleStyles]}>{title}</Text>}
{renderTitle
? renderTitle()
: !!title && (
<Text
style={[styles.textHeadline, styles.cardSectionTitle, titleStyles]}
accessibilityRole={CONST.ROLE.HEADER}
>
{title}
</Text>
)}
</View>
{cardLayout === CARD_LAYOUT.ICON_ON_RIGHT && (
<IconSection
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/ListItem/SplitListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function SplitListItem<TItem extends ListItem>({
accessibilityLabel={translate('common.edit')}
role="button"
style={styles.pointerEventsAuto}
sentryLabel="SplitListItem-EditButton"
sentryLabel={CONST.SENTRY_LABEL.SELECTION_LIST.SPLIT_LIST_ITEM_EDIT_BUTTON}
>
<Icon
src={icons.ArrowRight}
Expand Down
3 changes: 2 additions & 1 deletion src/components/SelectionList/components/ListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function ListHeader<TItem extends ListItem>({
return (
<View
style={[styles.userSelectNone, styles.peopleRow, styles.ph5, styles.pb3, headerStyle, styles.selectionListStickyHeader]}
accessibilityRole="header"
accessibilityRole={CONST.ROLE.HEADER}
>
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<Checkbox
Expand All @@ -76,6 +76,7 @@ function ListHeader<TItem extends ListItem>({
<PressableWithFeedback
style={[styles.userSelectNone, styles.flexRow, styles.alignItemsCenter]}
onPress={onSelectAll}
sentryLabel={CONST.SENTRY_LABEL.SELECTION_LIST.LIST_HEADER_SELECT_ALL}
accessibilityLabel={translate('workspace.people.selectAll')}
accessibilityRole="button"
accessibilityState={{checked: dataDetails.allSelected, disabled: allDisabled}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,12 @@ function BaseSelectionListWithSections<TItem extends ListItem>({
// we need to know the heights of all list items up-front in order to synchronously compute the layout of any given list item.
// So be aware that if you adjust the content of the section header (for example, change the font size), you may need to adjust this explicit height as well.
<View style={[styles.optionsListSectionHeader, styles.justifyContentCenter, sectionTitleStyles]}>
<Text style={[styles.ph5, styles.textLabelSupporting]}>{section.title}</Text>
<Text
style={[styles.ph5, styles.textLabelSupporting]}
accessibilityRole={CONST.ROLE.HEADER}
>
{section.title}
</Text>
</View>
);
};
Expand All @@ -627,6 +632,7 @@ function BaseSelectionListWithSections<TItem extends ListItem>({
style={[styles.userSelectNone, styles.flexRow, styles.alignItemsCenter]}
onPress={selectAllRow}
accessibilityLabel={translate('workspace.people.selectAll')}
sentryLabel={CONST.SENTRY_LABEL.SELECTION_LIST_WITH_SECTIONS.SELECT_ALL}
role="button"
accessibilityState={{checked: flattenedSections.allSelected}}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
Expand Down
13 changes: 3 additions & 10 deletions src/components/TransactionItemRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import AmountCell from '@components/SelectionListWithSections/Search/TotalCell';
import UserInfoCell from '@components/SelectionListWithSections/Search/UserInfoCell';
import WorkspaceCell from '@components/SelectionListWithSections/Search/WorkspaceCell';
import Text from '@components/Text';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
Expand All @@ -25,7 +24,7 @@ import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import {isCategoryMissing} from '@libs/CategoryUtils';
import getBase62ReportID from '@libs/getBase62ReportID';
import {computeReportName} from '@libs/ReportNameUtils';
import {getReportName} from '@libs/ReportNameUtils';
import {isExpenseReport, isIOUReport, isSettled} from '@libs/ReportUtils';
import StringUtils from '@libs/StringUtils';
import {
Expand Down Expand Up @@ -194,7 +193,6 @@ function TransactionItemRow({
const StyleUtils = useStyleUtils();
const theme = useTheme();
const {isLargeScreenWidth} = useResponsiveLayout();
const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails();
const hasCategoryOrTag = !isCategoryMissing(transactionItem?.category) || !!transactionItem.tag;
const createdAt = getTransactionCreated(transactionItem);
const expensicons = useMemoizedLazyExpensifyIcons(['ArrowRight']);
Expand Down Expand Up @@ -562,11 +560,7 @@ function TransactionItemRow({
[CONST.SEARCH.TABLE_COLUMNS.TITLE]: (
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TITLE)]}>
<TextCell
text={
computeReportName(transactionItem.report, undefined, undefined, undefined, undefined, undefined, undefined, currentUserAccountID) ??
transactionItem.report?.reportName ??
''
}
text={getReportName(transactionItem.report) || (transactionItem.report?.reportName ?? '')}
isLargeScreenWidth={isLargeScreenWidth}
/>
</View>
Expand Down Expand Up @@ -614,7 +608,6 @@ function TransactionItemRow({
isAmountColumnWide,
isTaxAmountColumnWide,
isLargeScreenWidth,
currentUserAccountID,
reportActions,
],
);
Expand Down Expand Up @@ -791,7 +784,7 @@ function TransactionItemRow({
style={[styles.p3Half, styles.pl0half, styles.pr0half, styles.justifyContentCenter, styles.alignItemsEnd]}
accessibilityRole={CONST.ROLE.BUTTON}
accessibilityLabel={CONST.ROLE.BUTTON}
sentryLabel="TransactionItemRow-ArrowRight"
sentryLabel={CONST.SENTRY_LABEL.TRANSACTION_ITEM_ROW.ARROW_RIGHT}
>
<Icon
src={expensicons.ArrowRight}
Expand Down
8 changes: 7 additions & 1 deletion src/components/WorkspaceEmptyStateSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {View} from 'react-native';
import type {StyleProp, ViewStyle} from 'react-native';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import CONST from '@src/CONST';
import type IconAsset from '@src/types/utils/IconAsset';
import Icon from './Icon';
import Text from './Text';
Expand Down Expand Up @@ -50,7 +51,12 @@ function WorkspaceEmptyStateSection({icon, subtitle, title, containerStyle, shou

<View style={[styles.w100, styles.pt5]}>
<View style={[styles.flexRow, styles.justifyContentCenter, styles.w100, styles.mh1, styles.flexShrink1]}>
<Text style={[styles.textHeadline, styles.emptyCardSectionTitle]}>{title}</Text>
<Text
style={[styles.textHeadline, styles.emptyCardSectionTitle]}
accessibilityRole={CONST.ROLE.HEADER}
>
{title}
</Text>
</View>

{(!!subtitle || !!subtitleComponent) && (
Expand Down
10 changes: 8 additions & 2 deletions src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,10 @@ function BaseOnboardingAccounting({shouldUseNativeStyles, route}: BaseOnboarding
const renderOption = useCallback(
(item: OnboardingListItem) => (
<PressableWithoutFeedback
sentryLabel="OnboardingAccounting-integrationOption"
key={item.keyForList ?? ''}
onPress={() => handleIntegrationSelect(item.keyForList)}
accessibilityLabel={item.text}
sentryLabel={CONST.SENTRY_LABEL.ONBOARDING.ACCOUNTING_SELECT_INTEGRATION}
accessible={false}
hoverStyle={!item.isSelected ? styles.hoveredComponentBG : undefined}
style={[styles.onboardingAccountingItem, isSmallScreenWidth && styles.flexBasis100, item.isSelected && styles.activeComponentBG]}
Expand Down Expand Up @@ -247,7 +248,12 @@ function BaseOnboardingAccounting({shouldUseNativeStyles, route}: BaseOnboarding
shouldDisplayHelpButton={false}
/>
<View style={[onboardingIsMediumOrLargerScreenWidth && styles.mt5, onboardingIsMediumOrLargerScreenWidth ? styles.mh8 : styles.mh5]}>
<Text style={[styles.textHeadlineH1, styles.mb5]}>{translate('onboarding.accounting.title')}</Text>
<Text
style={[styles.textHeadlineH1, styles.mb5]}
accessibilityRole={CONST.ROLE.HEADER}
>
{translate('onboarding.accounting.title')}
</Text>
</View>
<ScrollView style={[onboardingIsMediumOrLargerScreenWidth ? styles.mh8 : styles.mh5, styles.pt3, styles.pb8]}>
<View style={[styles.flexRow, styles.flexWrap, styles.gap3, styles.mb3]}>{accountingOptions.map(renderOption)}</View>
Expand Down
5 changes: 4 additions & 1 deletion src/pages/OnboardingEmployees/BaseOnboardingEmployees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ function BaseOnboardingEmployees({shouldUseNativeStyles, route}: BaseOnboardingE
}}
shouldDisplayHelpButton={false}
/>
<Text style={[styles.textHeadlineH1, styles.mb5, onboardingIsMediumOrLargerScreenWidth && styles.mt5, onboardingIsMediumOrLargerScreenWidth ? styles.mh8 : styles.mh5]}>
<Text
style={[styles.textHeadlineH1, styles.mb5, onboardingIsMediumOrLargerScreenWidth && styles.mt5, onboardingIsMediumOrLargerScreenWidth ? styles.mh8 : styles.mh5]}
accessibilityRole={CONST.ROLE.HEADER}
>
{translate('onboarding.employees.title')}
</Text>
<SelectionList
Expand Down
Loading
Loading