From b763424b1f82c78502a432bfbf0a14a8ea2c4306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 16 May 2026 17:51:24 +0200 Subject: [PATCH] fix(a11y): give every Progress bar an accessible name Lighthouse v1.4.33 a11y run flagged "ARIA progressbar elements missing accessible names" (score 91/94). The Radix Progress primitive renders a `role="progressbar"` host element but doesn't synthesise an `aria-label` from context -- the consumer must supply one. Reusing the on-screen label keys keeps the SR announcement matched to the visible caption. - src/app/insights/medikamente/page.tsx: compliance7/compliance30 - src/app/achievements/page.tsx: criterion meter + summary earned-points + next-goal progress - src/components/medications/medication-card.tsx: compliance7/30 - src/components/medications/glp1-medication-card.tsx: same `role="progressbar"` divs in `health-score-card.tsx`, `getting-started-checklist.tsx`, and `OnboardingShell.tsx` already carry aria-labels -- verified, no change needed. Refs Lighthouse-derived punch list (v1.4.33 perf audit). --- src/app/achievements/page.tsx | 16 +++++++++++++++- src/app/insights/medikamente/page.tsx | 14 ++++++++++++-- .../medications/glp1-medication-card.tsx | 13 +++++++++++-- src/components/medications/medication-card.tsx | 13 +++++++++++-- 4 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/app/achievements/page.tsx b/src/app/achievements/page.tsx index 5d6f013b3..8cf23f3c3 100644 --- a/src/app/achievements/page.tsx +++ b/src/app/achievements/page.tsx @@ -225,7 +225,19 @@ function AchievementCard({ achievement, t }: AchievementCardProps) { target: formatMetric(achievement.format, achievement.target, t), })}

- + {/* v1.4.33 IW9 — aria-label so the bar carries an accessible name. */} + )} @@ -328,6 +340,7 @@ export default function AchievementsPage() { : 0 } className="h-1.5" + aria-label={t("achievements.points")} />
@@ -385,6 +398,7 @@ export default function AchievementsPage() {
diff --git a/src/app/insights/medikamente/page.tsx b/src/app/insights/medikamente/page.tsx index 8ac211cd7..9fafb73a5 100644 --- a/src/app/insights/medikamente/page.tsx +++ b/src/app/insights/medikamente/page.tsx @@ -187,14 +187,24 @@ export default function InsightsMedikamentePage() { {t("insights.compliance7d")} {med.compliance7}% - + {/* v1.4.33 IW9 — aria-label so the bar has an + accessible name (Lighthouse a11y 91/94). */} +
{t("insights.compliance30d")} {med.compliance30}%
- +
diff --git a/src/components/medications/glp1-medication-card.tsx b/src/components/medications/glp1-medication-card.tsx index 47da29613..6be98d7ab 100644 --- a/src/components/medications/glp1-medication-card.tsx +++ b/src/components/medications/glp1-medication-card.tsx @@ -348,7 +348,12 @@ export function Glp1MedicationCard({ {rate7}%
- + {/* v1.4.33 IW9 — aria-label so the bar has an accessible name. */} +
@@ -357,7 +362,11 @@ export function Glp1MedicationCard({ {rate30}%
- +
{streak > 0 && (
diff --git a/src/components/medications/medication-card.tsx b/src/components/medications/medication-card.tsx index f4e7083ef..e33e2be7e 100644 --- a/src/components/medications/medication-card.tsx +++ b/src/components/medications/medication-card.tsx @@ -533,7 +533,12 @@ export function MedicationCard({ medication, onEdit }: MedicationCardProps) { {rate7}%
- + {/* v1.4.33 IW9 — aria-label so the bar has an accessible name. */} +
@@ -543,7 +548,11 @@ export function MedicationCard({ medication, onEdit }: MedicationCardProps) { {rate30}%
- +