Skip to content

Commit 2978ef5

Browse files
committed
Show a focus ring on sidebar thread and draft rows
Thread and draft rows are role=button with tabIndex=0 but set outline-none with no replacement, so keyboard focus is invisible. Add the inset ring the tool-call region and turn-fold button already use. Verify: Tab into the sidebar; the focused row shows a ring.
1 parent 894d334 commit 2978ef5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {
754754
tabIndex={0}
755755
data-testid="sidebar-draft-row"
756756
className={cn(
757-
"group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left text-sidebar-foreground outline-none select-none",
757+
"group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left text-sidebar-foreground outline-none select-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
758758
props.isActive ? "bg-sidebar-row-active" : draftSurfaceClassName,
759759
)}
760760
onClick={handleActivate}
@@ -1389,7 +1389,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
13891389
// a useful hierarchy nor a reliable hover cue. Status now lives in the row
13901390
// content; surface is reserved for interaction (hover, multi-select, route).
13911391
const rowSurfaceClassName = cn(
1392-
"group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none",
1392+
"group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left outline-none select-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
13931393
variantAction === "unsettle" && "[&:not(:hover):not(:focus-within)_*]:text-secondary-label/70",
13941394
props.isActive
13951395
? "bg-sidebar-row-active text-sidebar-foreground"

0 commit comments

Comments
 (0)