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

/map raises no title finding: its nodes name themselves without SVG <title>, and KNOWN_SIGNED_IN loses "title /map" #3212

Parked opened this
Closed without merging

scout/forge:scout/3207-map-raises-no-title-finding-its-nodes-na → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +11 −2
src/web/pages/map.ts +11 −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)}` : ""}"
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"
@@ -1299,6 +1299,16 @@ export const mapViewJs = /* js */ `
12991299 document.addEventListener('forge:swapped', function (e) { if (e.target && e.target.querySelectorAll) restore(e.target); });
13001300 window.addEventListener('resize', function () { all().forEach(function (c) { setup(c, false); }); });
13011301 all().forEach(function (c) { setup(c, false); });
1302 // A node's name is its aria-label; the hover tooltip is an SVG title element made on first pointer or focus, so the served page has only its own.
1303 function tip(e) {
1304 var a = e.target && e.target.closest ? e.target.closest('.map-node') : null;
1305 if (!a || a.querySelector('title')) return;
1306 var t = document.createElementNS('http://www.w3.org/2000/svg', 'title');
1307 t.textContent = a.getAttribute('aria-label') || '';
1308 a.insertBefore(t, a.firstChild);
1309 }
1310 document.addEventListener('mouseover', tip);
1311 document.addEventListener('focusin', tip);
13021312 })();
13031313 `;
13041314
test/forge-webspec.test.ts −1
@@ -38,7 +38,6 @@ const KNOWN_SIGNED_IN: Record<string, [string, string]> = {
3838 "etag /alice/notes/pulls/2": [CACHING, NO_ETAG],
3939 "etag /settings": [CACHING, NO_ETAG],
4040 "etag /settings/crew": [CACHING, NO_ETAG],
41 "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"],
4241 };
4342
4443 let cookie = "";

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs