The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 08:30 UTC
fix(web): usage chart's screen-reader caption stays hidden in Firefox (#38332)
Julius Marminge committed
Nov 17, 2026 at 13:13 UTC
51eb2d5437b217b5f9a8e9eff4f97a8e353ce201
1 file changed
+36
-33
apps/web/src/components/usage/UsageProviderChart.tsx
+36
-33
@@ -522,39 +522,42 @@ export function UsageProviderChart({
522
</span>
523
</div>
524
525
- {/* The plot and its axes are hover-only; this carries the same figures for screen readers. */}
526
- <table className="sr-only">
527
- <caption>
528
- {`${resolution === "hour" ? "Hourly" : "Daily"} ${metric === "tokens" ? "processed tokens" : "cost"} by provider`}
529
- </caption>
530
- <thead>
531
- <tr>
532
- <th scope="col">{resolution === "hour" ? "Hour" : "Day"}</th>
533
- {providers.map((provider) => (
534
- <th key={provider} scope="col">
535
- {PROVIDER_PRESENTATION[provider].label}
536
- </th>
537
- ))}
538
- {providers.length > 1 ? <th scope="col">Total</th> : null}
539
- </tr>
540
- </thead>
541
- <tbody>
542
- {periods.map((period, index) => {
543
- const column = columns[index];
544
- return (
545
- <tr key={period}>
546
- <th scope="row">{formatTooltipPeriod(period)}</th>
547
- {providers.map((provider) => (
548
- <td key={provider}>
549
- {format(column?.bands.find((band) => band.provider === provider)?.value ?? 0)}
550
- </td>
551
- ))}
552
- {providers.length > 1 ? <td>{format(column?.total ?? 0)}</td> : null}
553
- </tr>
554
- );
555
- })}
556
- </tbody>
557
- </table>
525
+ {/* The plot and its axes are hover-only; this carries the same figures for screen readers.
526
+ sr-only sits on a wrapper: Firefox does not clip a table's caption by the table's own box. */}
527
+ <div className="sr-only">
528
+ <table>
529
+ <caption>
530
+ {`${resolution === "hour" ? "Hourly" : "Daily"} ${metric === "tokens" ? "processed tokens" : "cost"} by provider`}
531
+ </caption>
532
+ <thead>
533
+ <tr>
534
+ <th scope="col">{resolution === "hour" ? "Hour" : "Day"}</th>
535
+ {providers.map((provider) => (
536
+ <th key={provider} scope="col">
537
+ {PROVIDER_PRESENTATION[provider].label}
538
+ </th>
539
+ ))}
540
+ {providers.length > 1 ? <th scope="col">Total</th> : null}
541
+ </tr>
542
+ </thead>
543
+ <tbody>
544
+ {periods.map((period, index) => {
545
+ const column = columns[index];
546
+ return (
547
+ <tr key={period}>
548
+ <th scope="row">{formatTooltipPeriod(period)}</th>
549
+ {providers.map((provider) => (
550
+ <td key={provider}>
551
+ {format(column?.bands.find((band) => band.provider === provider)?.value ?? 0)}
552
+ </td>
553
+ ))}
554
+ {providers.length > 1 ? <td>{format(column?.total ?? 0)}</td> : null}
555
+ </tr>
556
+ );
557
+ })}
558
+ </tbody>
559
+ </table>
560
+ </div>
561
</div>
562
);
563
}