Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Name Alert History row controls after their alert

rcourtmanb6cc0d01c968
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 76e951c32b..e28d3a39f0 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -260,6 +260,25 @@ message, so search and the Assistant handoff still read the record, and
attaches the source alert as `liveAlert` only to active, non-system rows.
Closed rows, and open ones without a live status, keep their recorded message.
+### History row controls name the alert they act on
+
+Every Alerts > History row, in the desktop table and the phone cards, repeats
+Timeline, Resource and an icon-only Assistant button, and each used to share
+one name ("Timeline", "Resource", "Ask Pulse Assistant about this alert"), so
+a screen-reader or speech-input user could not tell rows apart.
+`AlertHistoryItemActions` now names Timeline with
+`getAlertHistoryTimelineActionLabel` (alert title, resource and the row's full
+start time, since history repeats one alert over time; "Hide timeline for
+..." while open, with `aria-expanded`) and Resource with
+`getAlertHistoryResourceActionLabel` (rows on one resource share it because
+they open the same panel). The Assistant icon names its alert through the
+`alerts.assistant.iconLabel` and `alerts.assistant.iconLabelAt` catalog keys
+from the host's `subjectLabel` and `subjectTime`; a locked button keeps its
+locked explanation and the hover title is unchanged. Each name begins with
+the visible label (`AlertHistoryItemActions.test.tsx`,
+`AlertHistoryMobileList.test.tsx`, `InvestigateAlertButton.test.tsx`,
+`alertIncidentPresentation.test.ts`).
+
### Retained guest observations are not alert evidence
Guest memory marked `last-known`, `unavailable` or an unknown observation state
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 2b05c1aaf2..a85645139e 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -8923,6 +8923,16 @@ Spanish catalogs. `AlertIncidentSynthesisSummary.test.tsx`,
`useAlertOverviewState.test.tsx`, and `i18n.test.ts` pin inspectability,
uncertainty wording, and additive group behavior at the frontend boundary.
+### Repeated row controls carry row-specific names
+
+A control repeated on every row of a table or card list (Timeline, Resource,
+an icon-only action) gets an accessible name that says which row it acts on,
+starting with its visible label so speech input still matches it, and a
+toggle reports `aria-expanded`. Localized names go through catalog keys with
+placeholders for the row subject (`alerts.assistant.iconLabel`,
+`alerts.assistant.iconLabelAt`); every locale keeps those placeholders
+(`i18n.test.ts`).
+
### Mobile destinations are links and update evidence stays explicit
Fixed mobile destinations and menu destinations that navigate are anchors with
diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.md
index 8a521f22fa..64699f86d2 100644
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@ -589,6 +589,12 @@ command, prompt, or remediation payload into the model beyond the existing
scoped-investigation context, so it adds no new disclosure surface and the
existing resource-policy redaction still governs any model-bound context.
+The Alerts > History Assistant label keys (`alerts.assistant.iconLabel`,
+`alerts.assistant.iconLabelAt`) render the alert type, resource name and start
+time into the operator's own browser as accessible names. They are local UI
+copy: they add nothing to the Assistant handoff, the model-bound context or
+any request, so resource-policy redaction is unaffected.
+
Docker and Podman container CPU normalization may expose numeric raw per-core
CPU percent, normalized capacity percent, and reporting host CPU count in
resource or alert metadata. Those fields are operational usage telemetry only;
diff --git a/frontend-modern/browser-verification/3ed8ccba7d1141af.json b/frontend-modern/browser-verification/3ed8ccba7d1141af.json
new file mode 100644
index 0000000000..5241a6ea35
--- /dev/null
+++ b/frontend-modern/browser-verification/3ed8ccba7d1141af.json
@@ -0,0 +1,45 @@
+{
+ "version": 1,
+ "base_sha": "c509bbc31450ae659dab04d0b08ce1914d061c86",
+ "verified_at": "2026-10-15T12:02:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx",
+ "frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx",
+ "frontend-modern/src/i18n/messages.de.ts",
+ "frontend-modern/src/i18n/messages.es.ts",
+ "frontend-modern/src/i18n/messages.ts",
+ "frontend-modern/src/utils/alertIncidentPresentation.ts"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx": "c4458120850efa088a9187fb1c088879da5171144f450b09b0f4a8ef87a1aea1",
+ "frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx": "d3c7190ec951693d9ae658161c65efc87bcd39cd707302cada7c87eb960eccb0",
+ "frontend-modern/src/i18n/messages.de.ts": "f81943c20a804f8b2eb9f29733dbb8819e8872df54a0b731ca7e8db8d2f62857",
+ "frontend-modern/src/i18n/messages.es.ts": "6478e3164c61261b6336f1b6ace948a86cc5f00e0d3e0fa05a3fd1b58ed374e9",
+ "frontend-modern/src/i18n/messages.ts": "308e3785b51f3ce6995ff1ce995eb0ba0f65ab8721573f2fdf3e425b59213aca",
+ "frontend-modern/src/utils/alertIncidentPresentation.ts": "de64c875d77ef7fca28c2ab4a5bf5a2bec1102604b3ad308cb980743219dfda2"
+ },
+ "routes": [
+ "/alerts/history"
+ ],
+ "viewports": [
+ {
+ "width": 1280,
+ "height": 800
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "Before (main): 91 buttons named \"Timeline\", 91 \"Resource\" and 45 \"Ask Pulse Assistant about this alert\" on the mock estate history",
+ "After (desktop 1280): 75 rendered Timeline and Assistant buttons carry 75 distinct names, e.g. \"Timeline for Memory Limit on inventory-api, Thursday, 15 October 2026 at 12:56:37\" and \"Ask Pulse Assistant about Resource Health on esxi-07.lab.local, ...\"; Resource buttons repeat only for rows on the same resource",
+ "After (phone 375): 44 card controls with 44 distinct names; an open timeline reads \"Hide timeline for ...\" with aria-expanded true; no horizontal overflow",
+ "Visible labels and the Assistant hover title are unchanged"
+ ],
+ "interactions": [
+ "Counted accessible names of every rendered history row control at 1280px and 375px",
+ "Opened a phone card timeline and read its name and aria-expanded"
+ ]
+}
diff --git a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
index 6834affd70..d6aba76b00 100644
--- a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
+++ b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx
@@ -29,6 +29,14 @@ interface InvestigateAlertButtonProps {
* single-purpose regardless.
*/
patrolOption?: boolean;
+ /**
+ * The alert's display name (for example "Container Health"). The icon
+ * variant names the alert and its resource with it, because a table repeats
+ * the button on every row and a shared name tells the rows apart for no one.
+ */
+ subjectLabel?: string;
+ /** When the alert started, as the host shows it; tells repeated alerts apart. */
+ subjectTime?: string;
}
/**
@@ -67,6 +75,16 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
? t('alerts.assistant.patrol.title')
: t('alerts.assistant.unlockedTitle');
+ const iconLabel = () => {
+ const resourceName = props.alert.resourceName?.trim();
+ if (isLocked() || !resourceName) return buttonTitle();
+ const alertType = props.subjectLabel?.trim() || props.alert.type;
+ const startedAt = props.subjectTime?.trim();
+ return startedAt
+ ? t('alerts.assistant.iconLabelAt', { alertType, resourceName, startedAt })
+ : t('alerts.assistant.iconLabel', { alertType, resourceName });
+ };
+
const closeMenu = () => setMenuOpen(false);
const handleMenuClickOutside = (event: MouseEvent) => {
@@ -224,6 +242,7 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) {
${isLocked() ? 'opacity-60 cursor-not-allowed hover:bg-surface' : ''}
${props.class || ''}`}
title={buttonTitle()}
+ aria-label={iconLabel()}
aria-disabled={isLocked()}
>
<svg
diff --git a/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx b/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
index bc93b32485..7b96e1b051 100644
--- a/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
+++ b/frontend-modern/src/components/Alerts/__tests__/InvestigateAlertButton.test.tsx
@@ -225,6 +225,41 @@ describe('InvestigateAlertButton', () => {
expect(button).not.toHaveTextContent('Investigate');
});
+ // History repeats the icon on every row, so its name says which alert.
+ it('names the alert and its resource on the icon variant', () => {
+ render(() => (
+ <InvestigateAlertButton alert={makeAlert()} variant="icon" subjectLabel="CPU usage" />
+ ));
+ expect(
+ screen.getByRole('button', { name: 'Ask Pulse Assistant about CPU usage on test-vm' }),
+ ).toHaveAttribute('title', 'Ask Pulse Assistant about this alert');
+ });
+
+ it('adds the start time when the host gives one', () => {
+ render(() => (
+ <InvestigateAlertButton
+ alert={makeAlert()}
+ variant="icon"
+ subjectLabel="CPU usage"
+ subjectTime="15 Oct, 11:44"
+ />
+ ));
+ expect(
+ screen.getByRole('button', {
+ name: 'Ask Pulse Assistant about CPU usage on test-vm, 15 Oct, 11:44',
+ }),
+ ).toBeInTheDocument();
+ });
+
+ it('keeps the locked explanation as the icon name when locked', () => {
+ render(() => (
+ <InvestigateAlertButton alert={makeAlert()} variant="icon" licenseLocked={true} />
+ ));
+ expect(
+ screen.getByRole('button', { name: 'Pro required to ask Pulse Assistant about alerts' }),
+ ).toBeInTheDocument();
+ });
+
it('renders text variant with "Ask Pulse Assistant" label', () => {
render(() => <InvestigateAlertButton alert={makeAlert()} variant="text" />);
const button = screen.getByRole('button');
diff --git a/frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx b/frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx
index 74697f961e..3ee36b6f84 100644
--- a/frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx
+++ b/frontend-modern/src/features/alerts/AlertHistoryItemActions.tsx
@@ -1,7 +1,11 @@
import { Show } from 'solid-js';
import { InvestigateAlertButton } from '@/components/Alerts/InvestigateAlertButton';
-import { getAlertResourceIncidentViewTitle } from '@/utils/alertIncidentPresentation';
+import {
+ getAlertHistoryResourceActionLabel,
+ getAlertHistoryTimelineActionLabel,
+ getAlertResourceIncidentViewTitle,
+} from '@/utils/alertIncidentPresentation';
import type { AlertHistoryState } from './useAlertHistoryState';
@@ -19,6 +23,15 @@ interface AlertHistoryItemActionsProps {
export function AlertHistoryItemActions(props: AlertHistoryItemActionsProps) {
const rowKey = () => props.state.getIncidentRowKey(props.alert);
+ const timelineOpen = () => props.timelineOpen ?? props.state.expandedIncidents().has(rowKey());
+ // Every row repeats the same controls, so each name says which alert.
+ const timelineLabel = () =>
+ getAlertHistoryTimelineActionLabel({
+ open: timelineOpen(),
+ alertTitle: props.alert.title,
+ resourceName: props.alert.resourceName,
+ startedAt: props.state.formatAlertRowTimestamp(props.alert.startTime),
+ });
return (
<div class={`flex flex-wrap items-center gap-1.5 ${props.class ?? ''}`.trim()}>
@@ -29,6 +42,8 @@ export function AlertHistoryItemActions(props: AlertHistoryItemActionsProps) {
props.touchSized ? 'min-h-11' : ''
}`}
data-alert-history-action="timeline"
+ aria-label={timelineLabel()}
+ aria-expanded={timelineOpen()}
onClick={() => {
if (props.onTimelineClick) {
props.onTimelineClick();
@@ -41,9 +56,7 @@ export function AlertHistoryItemActions(props: AlertHistoryItemActionsProps) {
);
}}
>
- {(props.timelineOpen ?? props.state.expandedIncidents().has(rowKey()))
- ? 'Hide'
- : 'Timeline'}
+ {timelineOpen() ? 'Hide' : 'Timeline'}
</button>
</Show>
<Show when={props.alert.source === 'alert' && props.alert.resourceId}>
@@ -53,6 +66,7 @@ export function AlertHistoryItemActions(props: AlertHistoryItemActionsProps) {
props.touchSized ? 'min-h-11' : ''
}`}
data-alert-history-action="resource"
+ aria-label={getAlertHistoryResourceActionLabel(props.alert.resourceName)}
title={getAlertResourceIncidentViewTitle()}
onClick={() => {
if (props.onResourceClick) {
@@ -94,6 +108,8 @@ export function AlertHistoryItemActions(props: AlertHistoryItemActionsProps) {
metadata: props.alert.systemAlert ? { systemAlert: true } : undefined,
}}
resourceType={props.alert.resourceType}
+ subjectLabel={props.alert.title}
+ subjectTime={props.state.formatAlertRowTimestamp(props.alert.startTime)}
variant="icon"
size="sm"
class={props.touchSized ? 'min-h-11 min-w-11' : undefined}
diff --git a/frontend-modern/src/features/alerts/__tests__/AlertHistoryItemActions.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertHistoryItemActions.test.tsx
new file mode 100644
index 0000000000..dfc4c3d434
--- /dev/null
+++ b/frontend-modern/src/features/alerts/__tests__/AlertHistoryItemActions.test.tsx
@@ -0,0 +1,63 @@
+import { fireEvent, render, screen } from '@solidjs/testing-library';
+import { createSignal } from 'solid-js';
+import { describe, expect, it, vi } from 'vitest';
+
+import { AlertHistoryItemActions } from '../AlertHistoryItemActions';
+import type { AlertHistoryState } from '../useAlertHistoryState';
+
+vi.mock('@/components/Alerts/InvestigateAlertButton', () => ({
+ InvestigateAlertButton: () => null,
+}));
+
+type HistoryAlert = Parameters<typeof AlertHistoryItemActions>[0]['alert'];
+
+const occurrence = (id: string, startTime: string) =>
+ ({
+ id,
+ source: 'alert',
+ resourceId: 'vm-101',
+ resourceName: 'db-01',
+ resourceType: 'vm',
+ title: 'CPU usage',
+ severity: 'warning',
+ status: 'resolved',
+ startTime,
+ }) as unknown as HistoryAlert;
+
+// The History table repeats Timeline, Resource and the Assistant on every
+// row; on the mock estate 91 buttons were all named "Timeline".
+describe('AlertHistoryItemActions accessible names', () => {
+ it('names each row control after its alert, resource and time', async () => {
+ const [expanded, setExpanded] = createSignal(new Set<string>());
+ const state = {
+ getIncidentRowKey: (alert: HistoryAlert) => `${alert.id}-row`,
+ expandedIncidents: expanded,
+ toggleIncidentTimeline: vi.fn((rowKey: string) => setExpanded(new Set([rowKey]))),
+ openResourceIncidentPanel: vi.fn(),
+ formatAlertRowTimestamp: (startTime: string) =>
+ startTime.startsWith('2026-10-14') ? '14 Oct 2026, 09:00' : '15 Oct 2026, 11:44',
+ } as unknown as AlertHistoryState;
+
+ render(() => (
+ <>
+ <AlertHistoryItemActions alert={occurrence('a-1', '2026-10-14T09:00:00Z')} state={state} />
+ <AlertHistoryItemActions alert={occurrence('a-2', '2026-10-15T11:44:00Z')} state={state} />
+ </>
+ ));
+
+ const earlier = screen.getByRole('button', {
+ name: 'Timeline for CPU usage on db-01, 14 Oct 2026, 09:00',
+ });
+ expect(
+ screen.getByRole('button', { name: 'Timeline for CPU usage on db-01, 15 Oct 2026, 11:44' }),
+ ).toHaveAttribute('aria-expanded', 'false');
+ expect(screen.getAllByRole('button', { name: 'Resource incidents for db-01' })).toHaveLength(2);
+
+ await fireEvent.click(earlier);
+ expect(earlier).toHaveTextContent('Hide');
+ expect(earlier).toHaveAttribute('aria-expanded', 'true');
+ expect(earlier).toHaveAccessibleName(
+ 'Hide timeline for CPU usage on db-01, 14 Oct 2026, 09:00',
+ );
+ });
+});
diff --git a/frontend-modern/src/features/alerts/__tests__/AlertHistoryMobileList.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertHistoryMobileList.test.tsx
index 555050cd16..fd221b32de 100644
--- a/frontend-modern/src/features/alerts/__tests__/AlertHistoryMobileList.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/AlertHistoryMobileList.test.tsx
@@ -117,10 +117,12 @@ describe('AlertHistoryMobileList', () => {
expect(screen.getByText('warning')).toBeVisible();
expect(screen.getByText('resolved')).toBeVisible();
- expect(screen.getByRole('button', { name: 'Timeline' })).toHaveClass('min-h-11');
- expect(screen.getByRole('button', { name: 'Resource' })).toHaveClass('min-h-11');
+ expect(screen.getByRole('button', { name: /^Timeline for / })).toHaveClass('min-h-11');
+ expect(screen.getByRole('button', { name: /^Resource incidents for / })).toHaveClass(
+ 'min-h-11',
+ );
- await fireEvent.click(screen.getByRole('button', { name: 'Timeline' }));
+ await fireEvent.click(screen.getByRole('button', { name: /^Timeline for / }));
expect(toggleIncidentTimeline).toHaveBeenCalledWith(
'alert-1-row',
'alert-1',
@@ -131,7 +133,7 @@ describe('AlertHistoryMobileList', () => {
).toBeInTheDocument();
await fireEvent.click(screen.getByRole('button', { name: 'Close incident timeline' }));
- await fireEvent.click(screen.getByRole('button', { name: 'Resource' }));
+ await fireEvent.click(screen.getByRole('button', { name: /^Resource incidents for / }));
expect(openResourceIncidentPanel).toHaveBeenCalledWith(
'node-1',
'pve-production-01',
@@ -200,7 +202,7 @@ describe('AlertHistoryMobileList', () => {
const { state } = createState();
const { container } = render(() => <AlertHistoryMobileList state={state} />);
- await fireEvent.click(screen.getByRole('button', { name: 'Resource' }));
+ await fireEvent.click(screen.getByRole('button', { name: /^Resource incidents for / }));
const card = container.querySelector('article');
const dialog = screen.getByRole('dialog', {
@@ -221,7 +223,7 @@ describe('AlertHistoryMobileList', () => {
const { closeResourceIncidentPanel, state } = createState();
render(() => <AlertHistoryMobileList state={state} />);
- const resourceButton = screen.getByRole('button', { name: 'Resource' });
+ const resourceButton = screen.getByRole('button', { name: /^Resource incidents for / });
resourceButton.focus();
await fireEvent.click(resourceButton);
expect(screen.getByRole('dialog')).toBeInTheDocument();
@@ -231,7 +233,7 @@ describe('AlertHistoryMobileList', () => {
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
expect(closeResourceIncidentPanel).toHaveBeenCalled();
- expect(screen.getByRole('button', { name: 'Resource' })).toHaveFocus();
+ expect(screen.getByRole('button', { name: /^Resource incidents for / })).toHaveFocus();
});
});
@@ -255,7 +257,7 @@ describe('AlertHistoryMobileList changing history', () => {
const assistantOpen = vi.spyOn(aiChatStore, 'isOpen', 'get').mockReturnValue(false);
try {
expect(screen.queryByRole('dialog')).toBeNull();
- expect(screen.getByRole('button', { name: 'Timeline' })).toBeVisible();
+ expect(screen.getByRole('button', { name: /^Timeline for / })).toBeVisible();
assistantOpen.mockReturnValue(true);
viewport.matches = false;
resize();
@@ -308,7 +310,7 @@ describe('AlertHistoryMobileList changing history', () => {
const { closeResourceIncidentPanel, setGroupedAlerts, state } = createState();
render(() => <AlertHistoryMobileList state={state} />);
- const resourceButton = screen.getByRole('button', { name: 'Resource' });
+ const resourceButton = screen.getByRole('button', { name: /^Resource incidents for / });
resourceButton.focus();
await fireEvent.click(resourceButton);
expect(
@@ -353,7 +355,7 @@ describe('history handoff focus ownership', () => {
const open = vi.spyOn(aiChatStore, 'open').mockImplementation(() => composer.focus());
try {
render(() => <AlertHistoryMobileList state={state} />);
- await fireEvent.click(screen.getByRole('button', { name: 'Timeline' }));
+ await fireEvent.click(screen.getByRole('button', { name: /^Timeline for / }));
await fireEvent.click(
screen.getByRole('button', {
name: 'Discuss incident incident-focus with Pulse Assistant',
diff --git a/frontend-modern/src/i18n/__tests__/i18n.test.ts b/frontend-modern/src/i18n/__tests__/i18n.test.ts
index f900989ff7..748078c129 100644
--- a/frontend-modern/src/i18n/__tests__/i18n.test.ts
+++ b/frontend-modern/src/i18n/__tests__/i18n.test.ts
@@ -480,6 +480,14 @@ describe('i18n foundation', () => {
expect(I18N_MESSAGES[locale]['alerts.assistant.patrol.menuLabel']).toContain('Patrol');
expect(I18N_MESSAGES[locale]['alerts.assistant.patrol.title']).toContain('Patrol');
expect(I18N_MESSAGES[locale]['alerts.assistant.explain.menuLabel']).toContain('Assistant');
+ // History rows name each Assistant button after its alert, resource
+ // and start time; every locale must keep all three placeholders.
+ for (const key of ['alerts.assistant.iconLabel', 'alerts.assistant.iconLabelAt'] as const) {
+ expect(I18N_MESSAGES[locale][key]).toContain('Pulse Assistant');
+ expect(I18N_MESSAGES[locale][key]).toContain('{alertType}');
+ expect(I18N_MESSAGES[locale][key]).toContain('{resourceName}');
+ }
+ expect(I18N_MESSAGES[locale]['alerts.assistant.iconLabelAt']).toContain('{startedAt}');
expect(
t(
'alerts.assistant.action.investigate',
diff --git a/frontend-modern/src/i18n/messages.de.ts b/frontend-modern/src/i18n/messages.de.ts
index c92bc401eb..33d5b32aad 100644
--- a/frontend-modern/src/i18n/messages.de.ts
+++ b/frontend-modern/src/i18n/messages.de.ts
@@ -42,6 +42,9 @@ export const DE_MESSAGE_OVERRIDES = {
'alerts.assistant.subject': '{level} {alertType} auf {resourceName}',
'alerts.assistant.title': 'Warnungsanalyse angehaengt',
'alerts.assistant.unlockedTitle': 'Pulse Assistant zu dieser Warnmeldung fragen',
+ 'alerts.assistant.iconLabel': 'Pulse Assistant zu {alertType} auf {resourceName} fragen',
+ 'alerts.assistant.iconLabelAt':
+ 'Pulse Assistant zu {alertType} auf {resourceName} ({startedAt}) fragen',
'alerts.assistant.explain.menuLabel': 'Mit Assistant erklaeren',
'alerts.assistant.explain.menuHint': 'Diese Warnmeldung als reinen Kontext verwenden',
'alerts.assistant.patrol.chevron': 'Weitere Aktionen fuer diese Warnmeldung',
diff --git a/frontend-modern/src/i18n/messages.es.ts b/frontend-modern/src/i18n/messages.es.ts
index 93e11eb9df..c3a240f46d 100644
--- a/frontend-modern/src/i18n/messages.es.ts
+++ b/frontend-modern/src/i18n/messages.es.ts
@@ -41,6 +41,9 @@ export const ES_MESSAGE_OVERRIDES = {
'alerts.assistant.subject': '{level} {alertType} en {resourceName}',
'alerts.assistant.title': 'Investigacion de alerta adjunta',
'alerts.assistant.unlockedTitle': 'Preguntar a Pulse Assistant sobre esta alerta',
+ 'alerts.assistant.iconLabel': 'Preguntar a Pulse Assistant sobre {alertType} en {resourceName}',
+ 'alerts.assistant.iconLabelAt':
+ 'Preguntar a Pulse Assistant sobre {alertType} en {resourceName}, {startedAt}',
'alerts.assistant.explain.menuLabel': 'Explicar con Assistant',
'alerts.assistant.explain.menuHint': 'Usar esta alerta como contexto de solo lectura',
'alerts.assistant.patrol.chevron': 'Mas acciones para esta alerta',
diff --git a/frontend-modern/src/i18n/messages.ts b/frontend-modern/src/i18n/messages.ts
index 1406c08919..8372b9bb44 100644
--- a/frontend-modern/src/i18n/messages.ts
+++ b/frontend-modern/src/i18n/messages.ts
@@ -143,6 +143,9 @@ export const EN_MESSAGES = {
'alerts.assistant.subject': '{level} {alertType} on {resourceName}',
'alerts.assistant.title': 'Alert investigation attached',
'alerts.assistant.unlockedTitle': 'Ask Pulse Assistant about this alert',
+ 'alerts.assistant.iconLabel': 'Ask Pulse Assistant about {alertType} on {resourceName}',
+ 'alerts.assistant.iconLabelAt':
+ 'Ask Pulse Assistant about {alertType} on {resourceName}, {startedAt}',
'alerts.assistant.explain.menuLabel': 'Explain with Assistant',
'alerts.assistant.explain.menuHint': 'Use this alert as read-only context',
'alerts.assistant.patrol.chevron': 'More alert actions',
@@ -769,6 +772,8 @@ export const ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS = [
'alerts.assistant.subject',
'alerts.assistant.title',
'alerts.assistant.unlockedTitle',
+ 'alerts.assistant.iconLabel',
+ 'alerts.assistant.iconLabelAt',
'alerts.assistant.explain.menuLabel',
'alerts.assistant.explain.menuHint',
'alerts.assistant.patrol.chevron',
diff --git a/frontend-modern/src/utils/__tests__/alertIncidentPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertIncidentPresentation.test.ts
index deebbc497c..c248033bb8 100644
--- a/frontend-modern/src/utils/__tests__/alertIncidentPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertIncidentPresentation.test.ts
@@ -48,6 +48,8 @@ import {
getAlertResourceIncidentToggleButtonClass,
getAlertResourceIncidentTruncatedEventsLabel,
normalizeAlertIncidentStatus,
+ getAlertHistoryResourceActionLabel,
+ getAlertHistoryTimelineActionLabel,
} from '@/utils/alertIncidentPresentation';
describe('alertIncidentPresentation', () => {
@@ -246,3 +248,20 @@ describe('alertIncidentPresentation', () => {
expect(getAlertResourceIncidentTruncatedEventsLabel(6, 9)).toBe('Showing last 6 of 9 events');
});
});
+
+describe('alert history row action names', () => {
+ it('names the alert, resource and start time, led by the visible label', () => {
+ const base = { alertTitle: 'CPU usage', resourceName: 'db-01', startedAt: '15 Oct, 11:44' };
+ expect(getAlertHistoryTimelineActionLabel({ ...base, open: false })).toBe(
+ 'Timeline for CPU usage on db-01, 15 Oct, 11:44',
+ );
+ expect(getAlertHistoryTimelineActionLabel({ ...base, open: true })).toBe(
+ 'Hide timeline for CPU usage on db-01, 15 Oct, 11:44',
+ );
+ expect(getAlertHistoryTimelineActionLabel({ ...base, resourceName: '', open: false })).toBe(
+ 'Timeline for CPU usage, 15 Oct, 11:44',
+ );
+ expect(getAlertHistoryResourceActionLabel('db-01')).toBe('Resource incidents for db-01');
+ expect(getAlertHistoryResourceActionLabel(' ')).toBe('Resource incidents for this resource');
+ });
+});
diff --git a/frontend-modern/src/utils/alertIncidentPresentation.ts b/frontend-modern/src/utils/alertIncidentPresentation.ts
index af6b6d0721..270144f1c7 100644
--- a/frontend-modern/src/utils/alertIncidentPresentation.ts
+++ b/frontend-modern/src/utils/alertIncidentPresentation.ts
@@ -220,6 +220,29 @@ export function getAlertResourceIncidentViewTitle() {
return ALERT_RESOURCE_INCIDENT_VIEW_TITLE;
}
+/**
+ * Accessible names for the controls every alert history row repeats. A
+ * shared "Timeline" or "Resource" tells a screen-reader user nothing about
+ * which row it belongs to, and history repeats one alert over time, so the
+ * timeline control also names when it started. Each name begins with the
+ * visible label so speech input still finds it.
+ */
+export function getAlertHistoryTimelineActionLabel(options: {
+ open: boolean;
+ alertTitle: string;
+ resourceName?: string;
+ startedAt: string;
+}): string {
+ const subject = [options.alertTitle, options.resourceName && `on ${options.resourceName}`]
+ .filter(Boolean)
+ .join(' ');
+ return `${options.open ? 'Hide timeline' : 'Timeline'} for ${subject}, ${options.startedAt}`;
+}
+
+export function getAlertHistoryResourceActionLabel(resourceName?: string): string {
+ return `Resource incidents for ${resourceName?.trim() || 'this resource'}`;
+}
+
export function getAlertIncidentEventFilterContainerClass(
variant: AlertIncidentEventFilterVariant,
): string {