From 7036ff3e0c199f5305e122b337940298eb40486b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 4 Jun 2026 04:08:36 +0200 Subject: [PATCH] fix(insights): make the narrative period toggle accessible Replace the incomplete tablist/tab markup on the week/month toggle with plain buttons carrying aria-pressed, give them a 44px minimum tap target, and add a focus-visible ring. The visual treatment is unchanged. --- .../insights/period-narrative-card.tsx | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/components/insights/period-narrative-card.tsx b/src/components/insights/period-narrative-card.tsx index 933dba69d..ea4ac0a11 100644 --- a/src/components/insights/period-narrative-card.tsx +++ b/src/components/insights/period-narrative-card.tsx @@ -163,26 +163,28 @@ export function PeriodNarrativeCard({ {/* Week / month toggle. Calm segmented control, no chart. */} -
- {(["week", "month"] as const).map((p) => ( - - ))} +
+ {(["week", "month"] as const).map((p) => { + const active = period === p; + return ( + + ); + })}
{preparing ? (