From 2013ae7f5e71a3fe97c3bcedfae7b7717cc86b3f Mon Sep 17 00:00:00 2001 From: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com> Date: Fri, 6 Mar 2026 20:13:09 +0000 Subject: [PATCH] Revert "fix: Screen Reader: Workspace: 3-dot More button in Workspace container not focusable or operable" --- src/CONST/index.ts | 2 - src/pages/workspace/WorkspacesListPage.tsx | 17 ++- src/pages/workspace/WorkspacesListRow.tsx | 151 +++++++-------------- 3 files changed, 66 insertions(+), 104 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index b2e3c1fd43054..42c0048e112b4 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -8808,8 +8808,6 @@ const CONST = { NEW_WORKSPACE_BUTTON: 'WorkspaceList-NewWorkspaceButton', NEW_DOMAIN_BUTTON: 'WorkspaceList-NewDomainButton', THREE_DOT_MENU: 'WorkspaceList-ThreeDotMenu', - ROW: 'WorkspaceList-Row', - ROW_ARROW: 'WorkspaceList-RowArrow', }, INITIAL: { PROFILE: 'WorkspaceInitial-Profile', diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 146081ffd12fa..1fd431d7713ca 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -54,6 +54,7 @@ import { getConnectionExporters, getPolicyBrickRoadIndicatorStatus, getUberConnectionErrorDirectlyFromPolicy, + getUserFriendlyWorkspaceType, isPendingDeletePolicy, isPolicyAdmin, isPolicyAuditor, @@ -430,6 +431,17 @@ function WorkspacesListPage() { }); } + const ownerDisplayName = personalDetails?.[item.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID]?.displayName ?? ''; + const workspaceType = item.type ? getUserFriendlyWorkspaceType(item.type, translate) : ''; + const accessibilityLabel = [ + `${translate('workspace.common.workspace')}: ${item.title}`, + isDefault ? translate('common.default') : '', + `${translate('workspace.common.workspaceOwner')}: ${ownerDisplayName}`, + `${translate('workspace.common.workspaceType')}: ${workspaceType}`, + ] + .filter(Boolean) + .join(', '); + return ( )} diff --git a/src/pages/workspace/WorkspacesListRow.tsx b/src/pages/workspace/WorkspacesListRow.tsx index a5d767a9e737f..ac6f8bea28dff 100644 --- a/src/pages/workspace/WorkspacesListRow.tsx +++ b/src/pages/workspace/WorkspacesListRow.tsx @@ -9,7 +9,6 @@ import Avatar from '@components/Avatar'; import Badge from '@components/Badge'; import Icon from '@components/Icon'; import type {PopoverMenuItem} from '@components/PopoverMenu'; -import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; import Text from '@components/Text'; import TextWithTooltip from '@components/TextWithTooltip'; import ThreeDotsMenu from '@components/ThreeDotsMenu'; @@ -85,12 +84,6 @@ type WorkspacesListRowProps = WithCurrentUserPersonalDetailsProps & { /** Whether the list item is hovered */ isHovered?: boolean; - - /** Whether the row press is disabled */ - disabled?: boolean; - - /** Callback when the row is pressed */ - onPress?: () => void; }; type BrickRoadIndicatorIconProps = { @@ -129,8 +122,6 @@ function WorkspacesListRow({ isLoadingBill, resetLoadingSpinnerIconIndex, isHovered, - disabled, - onPress, }: WorkspacesListRowProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -186,92 +177,58 @@ function WorkspacesListRow({ const isDeleted = style && Array.isArray(style) ? style.includes(styles.offlineFeedbackDeleted) : false; - const ownerName = ownerDetails ? getDisplayNameOrDefault(ownerDetails) : ''; - const workspaceTypeName = workspaceType ? getUserFriendlyWorkspaceType(workspaceType, translate) : ''; - const accessibilityLabel = [ - `${translate('workspace.common.workspaceName')}: ${title}`, - isDefault ? translate('common.default') : '', - isJoinRequestPending ? translate('workspace.common.requested') : '', - ownerName ? `${translate('workspace.common.workspaceOwner')}: ${ownerName}` : '', - workspaceTypeName ? `${translate('workspace.common.workspaceType')}: ${workspaceTypeName}` : '', - ] - .filter(Boolean) - .join(', '); - - const RequestedBadge = isJoinRequestPending ? ( - - - - ) : null; - - const DefaultBadge = isDefault ? ( - - - - - - ) : null; - - const ThreeDotsSection = !isJoinRequestPending ? ( - - - - - - - ) : null; - - const NarrowBadges = - isJoinRequestPending || isDefault ? ( - - {RequestedBadge} - {DefaultBadge} - - ) : null; - const ThreeDotMenuOrPendingIcon = ( - {RequestedBadge} - {DefaultBadge} - {ThreeDotsSection} + {!!isJoinRequestPending && ( + + + + )} + {!!isDefault && ( + + + + + + )} + {!isJoinRequestPending && ( + + + + + + + )} ); return ( - + - {isNarrow && NarrowBadges} + {isNarrow && ThreeDotMenuOrPendingIcon} - + - - {isNarrow && ThreeDotsSection} + {!isNarrow && ThreeDotMenuOrPendingIcon} {!isNarrow && ( - + - + )}