admin: title-only information becomes visible text
the client address follows its name as visible muted text in the query tables, the config lock indicator prints its reason beside the tag except in table rows where a page-level note explains the lock instead, and the locked delete buttons describe themselves through that one visible note. the chart legend tooltip is deleted because a named client is deliberately not addressed in the chart, and the dead series address field went with it. titles that merely repeat visible copyable text stay.
This commit is contained in:
@@ -61,17 +61,20 @@ test("the lock is silent when the database owns the configuration", async () =>
|
||||
test("under file authority the lock names the file, in words a reader hears", async () => {
|
||||
renderIndicator(MANAGED_FILE);
|
||||
|
||||
// The reason is visible text beside the tag, not a title and not a label: a
|
||||
// tooltip reaches neither a keyboard nor a touch screen, and screen-reader-only
|
||||
// text is the same failure pointed the other way.
|
||||
const lock = await screen.findByText("Locked");
|
||||
await waitFor(() =>
|
||||
expect(lock.getAttribute("aria-label")).toBe(
|
||||
`Locked. Managed by ${CONFIG_PATH}; edit the file and restart nxdns.`,
|
||||
),
|
||||
expect(screen.getByText(`Managed by ${CONFIG_PATH}; edit the file and restart nxdns`)).toBeTruthy(),
|
||||
);
|
||||
expect(lock.getAttribute("title")).toBeNull();
|
||||
expect(lock.getAttribute("aria-label")).toBeNull();
|
||||
});
|
||||
|
||||
test("an unanswered status still locks, and says that is why", async () => {
|
||||
renderIndicator("failed");
|
||||
|
||||
const lock = await screen.findByText("Locked");
|
||||
await waitFor(() => expect(lock.getAttribute("aria-label")).toContain("Configuration status unavailable"));
|
||||
await screen.findByText("Locked");
|
||||
await waitFor(() => expect(screen.getByText(/^Configuration status unavailable/)).toBeTruthy());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user