Skip to content

Commit 0972e5c

Browse files
committed
Added aria label back
1 parent 0284b34 commit 0972e5c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Frontend/src/components/heartbeats/LastHeartbeat.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ defineProps<{ date?: string; tooltipTarget: string }>();
66
</script>
77

88
<template>
9-
<p v-if="date"><time-since :date-utc="date" default-text-on-failure="unknown" title-value="Last Heartbeat" /></p>
9+
<p v-if="date"><time-since aria-label="Last Heartbeat" :date-utc="date" default-text-on-failure="unknown" title-value="Last Heartbeat" /></p>
1010
<p v-else>
1111
<tippy :delay="[1000, 300]" :interactive="true">
1212
<template #content>
1313
<p>No heartbeat data received for this {{ tooltipTarget }}.</p>
1414
<p>Have you installed and configured the <a target="_blank" href="https://docs.particular.net/monitoring/heartbeats/install-plugin">heartbeats plugin</a> for this {{ tooltipTarget }}?</p>
1515
</template>
16-
<span>No data available</span>
16+
<span aria-label="Last Heartbeat">No data available</span>
1717
</tippy>
1818
</p>
1919
</template>

src/Frontend/test/specs/heartbeats/questions/getEndpointInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { screen, within } from "@testing-library/vue";
44
export async function getEndpointInstance(instanceName: string) {
55
const endpointRow = await screen.findByRole("row", { name: instanceName });
66
const hostName = within(endpointRow).getByLabelText("instance-name").textContent;
7-
const lastHeartbeat = within(endpointRow).getByTitle("Last Heartbeat").textContent;
7+
const lastHeartbeat = within(endpointRow).getByLabelText("Last Heartbeat").textContent;
88
const muted = (<HTMLInputElement>within(endpointRow).getByRole("checkbox", { hidden: true })).checked;
99

1010
return {

src/Frontend/test/specs/heartbeats/questions/getEndpointsForConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export async function getEndpointsForConfiguration() {
1616
endpointRows.map((row) => {
1717
const endpointName = String(within(row).getByRole("link", { name: "details-link" }).textContent);
1818
const instances = String(within(row).getByLabelText("instance-count").textContent);
19-
const lastHeartbeat = String(within(row).getByTitle("Last Heartbeat").textContent);
19+
const lastHeartbeat = String(within(row).getByLabelText("Last Heartbeat").textContent);
2020
const trackingCheckbox = <HTMLInputElement>within(row).getByRole("checkbox", { hidden: true });
2121
const trackingEnabled = trackingCheckbox.ariaLabel === `onoffswitch${endpointName}` && trackingCheckbox.checked;
2222

src/Frontend/test/specs/heartbeats/questions/getHeartbeatEndpointRecord.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function createRecordFromRowElement(endpointRow: HTMLElement) {
2929
return <EndpointRecord>{
3030
name: within(endpointRow).getByRole("link", { name: "details-link" }).textContent,
3131
instanceCount: within(endpointRow).getByLabelText("instance-count").textContent,
32-
lastHeartbeat: within(endpointRow).getByTitle("Last Heartbeat").textContent,
32+
lastHeartbeat: within(endpointRow).getByLabelText("Last Heartbeat").textContent,
3333
trackInstances: within(endpointRow).queryByTitle("Instances are being tracked") != null,
3434
instancesMuted: mutedInstanceCountElement === null ? 0 : Number(mutedInstanceCountElement.textContent),
3535
};

0 commit comments

Comments
 (0)