fix(a11y): give the loading score and vitals grids a role to name

Both grids carry an aria-label while their data loads, on a plain div,
which axe reports as aria-prohibited-attr: the label has no role to
name. A scan that lands while the scores strip is still loading fails on
it. The loading grids now take role=status, the role a loading region
has and which already implies the polite live region; the loaded vitals
grid carries neither.
This commit is contained in:
Marc-André Bombeck committed 2026-10-04 16:24:37 +02:00
1 parent 4916a29bbe
commit 6c0a606bf3
2 files changed
+7

No files matched your search

@@ -945,6 +945,9 @@ export function VitalsDashboard({ batch, layout, className }: DashboardProps) {
/>
<div
data-slot="vitals-dashboard-grid"
// The loading label needs a role to name (axe:
// aria-prohibited-attr); the loaded grid carries neither.
role={isLoading ? "status" : undefined}
aria-busy={isLoading}
aria-live="polite"
aria-label={
@@ -245,6 +245,10 @@ export function WellnessScores({
/>
<div
data-slot="wellness-scores-grid"
// `aria-label` needs a role to name; a bare <div> may not carry one
// (axe: aria-prohibited-attr). `status` is the loading region's
// role and already implies the polite live region.
role="status"
aria-busy="true"
aria-live="polite"
aria-label={t("insights.derived.scores.loadingLabel")}