@@ -170,6 +170,7 @@ import {
170170 resolveAdjacentThreadId ,
171171 resolveSidebarDropTarget ,
172172 resolveSidebarDropVerb ,
173+ resolveSidebarRowAccessibility ,
173174 type SidebarDropVerb ,
174175 resolveSidebarThreadStatus ,
175176 searchSidebarThreads ,
@@ -725,6 +726,12 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {
725726 promptPreview . length > 0
726727 ? promptPreview
727728 : `${ attachmentCount } attachment${ attachmentCount === 1 ? "" : "s" } ` ;
729+ const accessibility = resolveSidebarRowAccessibility ( {
730+ title : preview ,
731+ statusLabel : "Unsent draft" ,
732+ projectDisplayName : props . projectDisplayName ,
733+ isActive : props . isActive ,
734+ } ) ;
728735 const handleActivate = useCallback ( ( ) => onNavigate ( draftId ) , [ draftId , onNavigate ] ) ;
729736 const handleKeyDown = useCallback (
730737 ( event : ReactKeyboardEvent ) => {
@@ -752,6 +759,8 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {
752759 < div
753760 role = "button"
754761 tabIndex = { 0 }
762+ aria-label = { accessibility . label }
763+ aria-current = { accessibility . current }
755764 data-testid = "sidebar-draft-row"
756765 className = { cn (
757766 "group/sidebar-row relative w-full cursor-pointer overflow-hidden rounded-md text-left text-sidebar-foreground outline-none select-none" ,
@@ -760,6 +769,7 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {
760769 onClick = { handleActivate }
761770 onKeyDown = { handleKeyDown }
762771 >
772+ < span className = "sr-only" > { preview } </ span >
763773 < div className = "relative z-10 h-[4.875rem] px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)" >
764774 < div className = "flex h-5 min-w-0 items-center gap-1.5" >
765775 < SquarePenIcon aria-hidden className = { draftPenClassName } />
@@ -787,7 +797,9 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {
787797 </ Tooltip >
788798 </ span >
789799 </ div >
790- < div className = "mt-0.5 truncate text-sm font-medium text-foreground/90" > { preview } </ div >
800+ < div aria-hidden className = "mt-0.5 truncate text-sm font-medium text-foreground/90" >
801+ { preview }
802+ </ div >
791803 </ div >
792804 </ div >
793805 </ li >
@@ -1439,6 +1451,13 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
14391451 </ span >
14401452 ) : null ;
14411453
1454+ const accessibility = resolveSidebarRowAccessibility ( {
1455+ title : thread . title ,
1456+ statusLabel : topStatus ?. label ?? null ,
1457+ projectDisplayName : props . projectDisplayName ,
1458+ isActive : props . isActive ,
1459+ } ) ;
1460+
14421461 const title = isRenaming ? (
14431462 < input
14441463 autoFocus
@@ -1454,6 +1473,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
14541473 />
14551474 ) : (
14561475 < span
1476+ aria-hidden
14571477 className = { cn (
14581478 "min-w-0 flex-1 text-sm transition-opacity motion-reduce:transition-none" ,
14591479 shouldRecede ? "font-normal" : "font-medium" ,
@@ -1484,6 +1504,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
14841504 { thread . title }
14851505 </ span >
14861506 ) ;
1507+ const accessibleTitle = isRenaming ? null : < span className = "sr-only" > { thread . title } </ span > ;
14871508
14881509 // Stacks show their layer count; multiple unrelated links show their total count.
14891510 // Plain clicks open T3; individual PR links also support opening the host in a new tab.
@@ -1582,6 +1603,8 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
15821603 ref = { rowRef }
15831604 role = "button"
15841605 tabIndex = { 0 }
1606+ aria-label = { accessibility . label }
1607+ aria-current = { accessibility . current }
15851608 data-testid = "sidebar-row-slim"
15861609 aria-busy = { isRegeneratingTitle || undefined }
15871610 className = { cn ( rowSurfaceClassName , "flex h-9 items-center gap-2.5 px-2.5" ) }
@@ -1592,6 +1615,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
15921615 />
15931616 }
15941617 >
1618+ { accessibleTitle }
15951619 { /* Settled history recedes: dimmed favicon at rest, restored on
15961620 hover so the tail stays scannable when you're hunting. */ }
15971621 < span
@@ -1735,6 +1759,8 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
17351759 ref = { rowRef }
17361760 role = "button"
17371761 tabIndex = { 0 }
1762+ aria-label = { accessibility . label }
1763+ aria-current = { accessibility . current }
17381764 data-testid = "sidebar-row-card"
17391765 aria-busy = { isRegeneratingTitle || undefined }
17401766 className = { rowSurfaceClassName }
@@ -1745,6 +1771,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
17451771 />
17461772 }
17471773 >
1774+ { accessibleTitle }
17481775 < div className = "relative z-10 h-[4.875rem] px-(--sidebar-row-content-inset) py-(--sidebar-content-inset)" >
17491776 < div className = "flex h-5 min-w-0 items-center gap-1.5" >
17501777 { draftIndicator }
@@ -1997,6 +2024,12 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {
19972024 onFileDropThreads : ( threadRef : ScopedThreadRef , files : File [ ] ) => void ;
19982025} ) {
19992026 const { thread } = props ;
2027+ const accessibility = resolveSidebarRowAccessibility ( {
2028+ title : thread . title ,
2029+ statusLabel : null ,
2030+ projectDisplayName : props . projectDisplayName ,
2031+ isActive : props . isRouteActive ,
2032+ } ) ;
20002033 const threadRef = useMemo (
20012034 ( ) => scopeThreadRef ( thread . environmentId , thread . id ) ,
20022035 [ thread . environmentId , thread . id ] ,
@@ -2073,12 +2106,8 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {
20732106 // which owns all keyboard interaction for the listbox.
20742107 tabIndex = { - 1 }
20752108 aria-selected = { props . isHighlighted }
2076- aria-current = { props . isRouteActive ? "page" : undefined }
2077- aria-label = {
2078- props . projectDisplayName
2079- ? `${ thread . title } , ${ props . projectDisplayName } `
2080- : thread . title
2081- }
2109+ aria-current = { accessibility . current }
2110+ aria-label = { accessibility . label }
20822111 onMouseMove = { props . onHighlight }
20832112 onClick = { props . onSelect }
20842113 className = { cn (
@@ -4537,7 +4566,7 @@ export default function Sidebar() {
45374566 </ SidebarGroup >
45384567 }
45394568 >
4540- < SidebarGroup className = "flex-1" >
4569+ < SidebarGroup className = "flex-1" role = "presentation" >
45414570 { isSearchingThreads ? (
45424571 threadSearchResults . length > 0 ? (
45434572 < TooltipProvider
@@ -4628,7 +4657,11 @@ export default function Sidebar() {
46284657 < SortableContext items = { sortableIds } strategy = { sidebarSortingStrategy } >
46294658 < ul
46304659 ref = { attachListMotionRef }
4631- role = "list"
4660+ // VoiceOver treats an exposed list as an interaction boundary,
4661+ // which hides its rows from ordinary linear navigation. A
4662+ // presentational list also makes its implicit listitems
4663+ // presentational while preserving every descendant control.
4664+ role = "presentation"
46324665 className = { cn (
46334666 "relative flex flex-col gap-px" ,
46344667 sidebarListItems . length > 0 && "flex-1" ,
0 commit comments