From f1405b9bc15a1bbb1c65424884d0e8e22165e838 Mon Sep 17 00:00:00 2001 From: Burhan-Rashid Date: Fri, 13 Mar 2026 12:15:32 +0530 Subject: [PATCH 1/4] fix: current active menu button not getting announced in settings profile page --- src/components/MenuItem.tsx | 5 +++++ src/pages/settings/InitialSettingsPage.tsx | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index b4d71df7d8e1a..11120df55056f 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -420,6 +420,9 @@ type MenuItemBaseProps = ForwardedFSClassProps & /** Whether the screen containing the item is focused */ isFocused?: boolean; + /** Whether the item is selected */ + selected?: boolean; + /** Additional styles for the root wrapper View */ rootWrapperStyle?: StyleProp; @@ -576,6 +579,7 @@ function MenuItem({ forwardedFSClass, ref, isFocused, + selected = false, sentryLabel, rootWrapperStyle, role = CONST.ROLE.BUTTON, @@ -797,6 +801,7 @@ function MenuItem({ role={interactive ? role : undefined} accessibilityLabel={`${enhancedAccessibilityLabel}${brickRoadIndicator ? `. ${translate('common.yourReviewIsRequired')}` : ''}`} accessible={shouldBeAccessible} + accessibilityState={{selected}} tabIndex={interactive ? tabIndex : -1} onFocus={onFocus} sentryLabel={sentryLabel} diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx index 53f76ffc1797f..d2c559f779297 100755 --- a/src/pages/settings/InitialSettingsPage.tsx +++ b/src/pages/settings/InitialSettingsPage.tsx @@ -470,6 +470,8 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr shouldBlockSelection={!!item.link} onSecondaryInteraction={item.link ? (event) => openPopover(item.link, event) : undefined} focused={isFocused} + selected={isFocused} + role={CONST.ROLE.TAB} isPaneMenu sentryLabel={item.sentryLabel} iconRight={item.iconRight} From a4848054db971385f01efce66302e0eec38fbad6 Mon Sep 17 00:00:00 2001 From: Burhan-Rashid Date: Fri, 13 Mar 2026 18:31:28 +0530 Subject: [PATCH 2/4] fixed pr comments --- src/components/MenuItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 11120df55056f..09b05d82a10c3 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -579,7 +579,7 @@ function MenuItem({ forwardedFSClass, ref, isFocused, - selected = false, + selected, sentryLabel, rootWrapperStyle, role = CONST.ROLE.BUTTON, From 629c87e25cdcab864d0d99dab2d4e4a24a6354a2 Mon Sep 17 00:00:00 2001 From: Burhan-Rashid Date: Mon, 16 Mar 2026 08:28:54 +0530 Subject: [PATCH 3/4] fixed PR comments and added changes for reports page and workspaceInitialPage --- src/components/MenuItem.tsx | 6 +----- src/pages/Search/SearchTypeMenuItem.tsx | 3 ++- src/pages/settings/InitialSettingsPage.tsx | 1 - src/pages/workspace/WorkspaceInitialPage.tsx | 1 + 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index 09b05d82a10c3..f97e4d996e41c 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -420,9 +420,6 @@ type MenuItemBaseProps = ForwardedFSClassProps & /** Whether the screen containing the item is focused */ isFocused?: boolean; - /** Whether the item is selected */ - selected?: boolean; - /** Additional styles for the root wrapper View */ rootWrapperStyle?: StyleProp; @@ -579,7 +576,6 @@ function MenuItem({ forwardedFSClass, ref, isFocused, - selected, sentryLabel, rootWrapperStyle, role = CONST.ROLE.BUTTON, @@ -801,7 +797,7 @@ function MenuItem({ role={interactive ? role : undefined} accessibilityLabel={`${enhancedAccessibilityLabel}${brickRoadIndicator ? `. ${translate('common.yourReviewIsRequired')}` : ''}`} accessible={shouldBeAccessible} - accessibilityState={{selected}} + accessibilityState={role === CONST.ROLE.TAB ? {selected: focused} : undefined} tabIndex={interactive ? tabIndex : -1} onFocus={onFocus} sentryLabel={sentryLabel} diff --git a/src/pages/Search/SearchTypeMenuItem.tsx b/src/pages/Search/SearchTypeMenuItem.tsx index cefdca795cebe..1dbdb281b0044 100644 --- a/src/pages/Search/SearchTypeMenuItem.tsx +++ b/src/pages/Search/SearchTypeMenuItem.tsx @@ -41,7 +41,8 @@ function SearchTypeMenuItem({title, icon, badgeText, focused = false, onPress}: [ styles.flexRow, diff --git a/src/pages/settings/InitialSettingsPage.tsx b/src/pages/settings/InitialSettingsPage.tsx index d2c559f779297..f0ed8e7dbef77 100755 --- a/src/pages/settings/InitialSettingsPage.tsx +++ b/src/pages/settings/InitialSettingsPage.tsx @@ -470,7 +470,6 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr shouldBlockSelection={!!item.link} onSecondaryInteraction={item.link ? (event) => openPopover(item.link, event) : undefined} focused={isFocused} - selected={isFocused} role={CONST.ROLE.TAB} isPaneMenu sentryLabel={item.sentryLabel} diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index 310b2107e7b2f..d91edf8eeb6d8 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -478,6 +478,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac wrapperStyle={styles.sectionMenuItem(shouldUseNarrowLayout)} highlighted={!!item?.highlighted} focused={!!(item.screenName && activeRoute?.startsWith(item.screenName))} + role={CONST.ROLE.TAB} badgeText={item.badgeText} shouldIconUseAutoWidthStyle sentryLabel={item.sentryLabel} From 34fb1d292faef23c1506b265d0ea9d10d4853555 Mon Sep 17 00:00:00 2001 From: Burhan-Rashid Date: Mon, 16 Mar 2026 09:20:35 +0530 Subject: [PATCH 4/4] added role prop for saved search menuItems as well --- src/pages/Search/SavedSearchList.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Search/SavedSearchList.tsx b/src/pages/Search/SavedSearchList.tsx index 757696b32507b..a97e734906ea7 100644 --- a/src/pages/Search/SavedSearchList.tsx +++ b/src/pages/Search/SavedSearchList.tsx @@ -84,6 +84,7 @@ function SavedSearchList({hash}: SavedSearchListProps) { return { ...baseMenuItem, + role: CONST.ROLE.TAB, sentryLabel: CONST.SENTRY_LABEL.SEARCH.SAVED_SEARCH_MENU_ITEM, onPress: () => { setSearchContext(false);