Skip to content

Commit 35154ef

Browse files
committed
a11y improvements
1 parent ab77ff2 commit 35154ef

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

webview-ui/src/components/chat/ChatRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ export const ChatRowContent = ({
10851085
e.stopPropagation() // Prevent parent onClick from firing
10861086
vscode.postMessage({ type: "switchTab", tab: "cloud" })
10871087
}}
1088-
title={cloudIsAuthenticated ? t("chat:apiRequest.viewTokenUsage") : undefined}>
1088+
title={t("chat:apiRequest.viewTokenUsage")}>
10891089
${Number(cost || 0)?.toFixed(4)}
10901090
</div>
10911091
</div>

webview-ui/src/components/cloud/UsagePreview.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,18 @@ export const UsagePreview = ({ onViewDetails }: UsagePreviewProps) => {
136136
<div className="cursor-pointer group rounded-lg bg-vscode-editor-background relative" onClick={onViewDetails}>
137137
<div className="p-4">
138138
{/* Chart with daily usage bars */}
139-
<div className="h-24 min-[450px]:h-40 rounded mb-3 flex items-end gap-1 pb-2">
139+
<div
140+
className="h-24 min-[450px]:h-40 rounded mb-3 flex items-end gap-1 pb-2"
141+
role="img"
142+
aria-label={t("cloud:usagePreview.costPastDays", { count: data.days.length })}>
140143
{data &&
141144
Array.isArray(data.days) &&
142145
data.days.map((day, index) => (
143146
<div key={index} className="w-full flex flex-col items-center justify-end h-full">
144147
<div
145148
className="w-full rounded-t-xs transition-all bg-vscode-button-background"
146149
style={{ height: `${getBarHeight(day.cost)}%` }}
150+
aria-label={`${formatDateShort(new Date(day.date).getTime())}: ${formatCost(day.cost)}`}
147151
/>
148152
<span className="text-[9px] h-[1em] hidden min-[300px]:block overflow-clip text-center text-muted-foreground mt-0.5">
149153
{formatDateShort(new Date(day.date).getTime())}

0 commit comments

Comments
 (0)