From 075face3cbf95e99f77c7081b49c28a436009ad6 Mon Sep 17 00:00:00 2001 From: code-qtzl <122120619+code-qtzl@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:01:33 -0500 Subject: [PATCH] fix(site/src/pages/WorkspacePage/WorkspaceNotifications): make workspace notification pills keyboard accessible (#24536) Description: The workspace notification pills were implemented using Tooltip, which is hover-only and not reachable via keyboard navigation. Replace Tooltip/TooltipProvider/TooltipTrigger with Popover/PopoverContent/PopoverTrigger, and change the trigger element from a non-interactive div to a button. This makes the notification pills fully keyboard accessible. Screenshot: **Issue** not-working **Fix** working --- .../WorkspaceNotifications/Notifications.tsx | 71 +++++++++---------- .../WorkspaceNotifications.tsx | 4 +- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/site/src/pages/WorkspacePage/WorkspaceNotifications/Notifications.tsx b/site/src/pages/WorkspacePage/WorkspaceNotifications/Notifications.tsx index e2d1757f26..56ecd90121 100644 --- a/site/src/pages/WorkspacePage/WorkspaceNotifications/Notifications.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceNotifications/Notifications.tsx @@ -4,11 +4,10 @@ import type { AlertProps } from "#/components/Alert/Alert"; import { Button, type ButtonProps } from "#/components/Button/Button"; import { Pill } from "#/components/Pill/Pill"; import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "#/components/Tooltip/Tooltip"; + Popover, + PopoverContent, + PopoverTrigger, +} from "#/components/Popover/Popover"; import type { ThemeRole } from "#/theme/roles"; export type NotificationItem = { @@ -33,55 +32,53 @@ export const Notifications: FC = ({ const theme = useTheme(); return ( - - - -
- -
-
- + + + + + {items.map((n) => ( + + ))} + + ); }; type NotificationPillProps = NotificationsProps & { - isTooltipOpen: boolean; + isOpen: boolean; }; const NotificationPill: FC = ({ items, severity, icon, - isTooltipOpen, + isOpen, }) => { return ( ({ "& svg": { color: theme.roles[severity].outline }, - borderColor: isTooltipOpen ? theme.roles[severity].outline : undefined, + borderColor: isOpen ? theme.roles[severity].outline : undefined, })} > {items.length} diff --git a/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx b/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx index 6147185813..90465b219a 100644 --- a/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx @@ -270,7 +270,9 @@ export const WorkspaceNotifications: FC = ({ } + icon={ +