diff --git a/ui/src/components/health/health-priority-card.tsx b/ui/src/components/health/health-priority-card.tsx index 83c600a5..9c817807 100644 --- a/ui/src/components/health/health-priority-card.tsx +++ b/ui/src/components/health/health-priority-card.tsx @@ -35,6 +35,39 @@ export function HealthPriorityCard({ check }: HealthPriorityCardProps) { } }; + const headerInner = ( + <> + {/* Status Icon with Ring */} +
+ +
+ +
+
+

{check.name}

+ {hasContent && ( +
+ +
+ )} +
+

+ {check.message} +

+
+ + ); + return (
-
hasContent && setIsExpanded(!isExpanded)} - > - {/* Status Icon with Ring */} -
+ * so keyboard and screen-reader users can toggle it; aria-expanded + * reflects state. Without content, render a plain
. + */} + {hasContent ? ( +
- -
-
-

{check.name}

- {hasContent && ( -
- -
- )} -
-

- {check.message} -

-
-
+ {headerInner} + + ) : ( +
{headerInner}
+ )} {isExpanded && ( diff --git a/ui/src/components/health/health-status-ribbon.tsx b/ui/src/components/health/health-status-ribbon.tsx index 41b07ce4..320ece6d 100644 --- a/ui/src/components/health/health-status-ribbon.tsx +++ b/ui/src/components/health/health-status-ribbon.tsx @@ -25,7 +25,11 @@ function formatRelativeTime( const seconds = Math.floor((Date.now() - timestamp) / 1000); if (seconds < 5) return t('health.justNow'); if (seconds < 60) return t('health.secondsAgo', { count: seconds }); - return t('health.minutesAgo', { count: Math.floor(seconds / 60) }); + const minutes = Math.floor(seconds / 60); + if (minutes < 60) return t('health.minutesAgo', { count: minutes }); + // Roll up to hours so a stale "120 minutes ago" reads as "2 hours ago" + const hours = Math.floor(minutes / 60); + return t('health.hoursAgo', { count: hours }); } export function HealthStatusRibbon({