Skip to content

Commit b965372

Browse files
authored
fix(sessions): make compaction progress bar decorative for a11y
React Doctor flagged the indeterminate compaction bar for using role="progressbar" on a div (prefer-tag-over-role). The bar is decorative — its status is already carried by the visible "Compacting conversation history..." text and the spinner — so drop the role/aria-label and mark it aria-hidden, matching the existing quill-section-loading swoop loader and the decorative spinners in the same feature. Generated-By: PostHog Code Task-Id: 1a85695f-6d34-4d9c-9a78-c2f4c836acf4
1 parent 9a9b236 commit b965372

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/ui/src/features/sessions/components/session-update/StatusNotificationView.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,8 @@ function CompactingStatusView() {
150150
{formatDuration(elapsed, 1)}
151151
</Text>
152152
</Flex>
153-
<div
154-
className="compacting-progress mt-1.5"
155-
role="progressbar"
156-
aria-label="Compacting conversation history"
157-
/>
153+
{/* Decorative: the spinner and the text above carry the accessible status. */}
154+
<div className="compacting-progress mt-1.5" aria-hidden="true" />
158155
</Box>
159156
);
160157
}

0 commit comments

Comments
 (0)