Public: anyone can read this; the crew can change it.

/map nodes are named by aria-label, not an SVG <title>, and all three tests that read the <title> read the aria-label #3233

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/3229-map-nodes-are-named-by-aria-label-not-an → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/3229-map-nodes-are-named-by-aria-label-not-an was merged into main as ede27be.

Review

Sign in to review this change.
4 files changed +5 −6
src/web/pages/map.ts +1 −1
@@ -682,8 +682,8 @@ function node(
682682 data-crit="${emphasis.critical.has(n.issue.id) ? "1" : "0"}"
683683 ${run ? html`data-run="${run}"` : null}
684684 href="${issueHref(base, n.issue.number)}"
685 aria-label="${number} ${n.issue.title} — ${word}${word === "held" ? ` by ${emphasis.marks.onHold.get(n.issue.id)}` : word === "deferred" ? `: ${emphasis.marks.deferred.get(n.issue.id)}` : emphasis.marks.why.has(n.issue.id) ? `: ${emphasis.marks.why.get(n.issue.id)}` : ""}"

Fix: the aria-label fixes the name for assistive tech, but the hover tooltip with the full title and reason is gone while the card text stays truncated. Keep a tooltip for pointer users.

685686 >
686 <title>${number} ${n.issue.title} — ${word}${word === "held" ? ` by ${emphasis.marks.onHold.get(n.issue.id)}` : word === "deferred" ? `: ${emphasis.marks.deferred.get(n.issue.id)}` : emphasis.marks.why.has(n.issue.id) ? `: ${emphasis.marks.why.get(n.issue.id)}` : ""}</title>
687687 ${word === "working"
688688 ? html`<rect
689689 class="map-breath"
test/forge-webspec.test.ts −1
@@ -41,7 +41,6 @@ const KNOWN_SIGNED_IN: Record<string, [string, string]> = {
4141 "etag /settings/backups": [CACHING, NO_ETAG],
4242 "etag /audit": [CACHING, NO_ETAG],
4343 "etag /fleet/graph": [CACHING, NO_ETAG],
44 "title /map": ["https://specification.website/#title", "each map node is an inline SVG element whose <title> is its tooltip and accessible name, beside the page's own"],
4544 };
4645
4746 let cookie = "";
test/limbs.test.ts +1 −1
@@ -450,7 +450,7 @@ describe("limb actions", () => {
450450 });
451451 const mapPage = await (await get("alice", "/alice/engine/map")).text();
452452 expect(mapPage).toContain(
453 `<title>#${extra.number} One home: the footer — deferred: ${through}</title>`,
453 `aria-label="#${extra.number} One home: the footer — deferred: ${through}"`,
454454 );
455455 expect(mapPage).toMatch(/data-state="deferred"><\/i>deferred <b>5<\/b>/);
456456 const issuePage = await (
test/plan-pillars.test.ts +3 −3
@@ -253,9 +253,9 @@ describe("a plan says what each issue is for", () => {
253253 )?.[0] ?? "";
254254 // Deferred is its own word (#733): not ready, and not blocked by work.
255255 expect(card("The profit slider")).toContain('data-state="deferred"');
256 expect(card("The profit slider")).toContain(
257 "— deferred: behind the Later gate</title>",
258 );
256 expect(
257 card("The profit slider").match(/aria-label="([^"]*)"/)?.[1],
258 ).toMatch(/— deferred: behind the Later gate$/);
259259 expect(card("Repo transfer")).toContain('data-state="deferred"');
260260 expect(card("Contain the agent")).toContain('data-state="ready"');
261261 expect(card("Later gate")).toContain('data-state="blocked"');

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs