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" #3209
scout/forge:scout/3207-map-raises-no-title-finding-its-nodes-na → main 1 commit fork
2 files
changed +11
−2
src/web/pages/map.ts +11 −1
| @@ -682,8 +682,8 @@ function node( | ||
| 682 | 682 | data-crit="${emphasis.critical.has(n.issue.id) ? "1" : "0"}" |
| 683 | 683 | ${run ? html`data-run="${run}"` : null} |
| 684 | 684 | 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)}` : ""}" | |
| 685 | 686 | > |
| 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> | |
| 687 | 687 | ${word === "working" |
| 688 | 688 | ? html`<rect |
| 689 | 689 | class="map-breath" |
| @@ -1299,6 +1299,16 @@ export const mapViewJs = /* js */ ` | ||
| 1299 | 1299 | document.addEventListener('forge:swapped', function (e) { if (e.target && e.target.querySelectorAll) restore(e.target); }); |
| 1300 | 1300 | window.addEventListener('resize', function () { all().forEach(function (c) { setup(c, false); }); }); |
| 1301 | 1301 | 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); | |
| 1302 | 1312 | })(); |
| 1303 | 1313 | `; |
| 1304 | 1314 |
test/forge-webspec.test.ts −1
| @@ -38,7 +38,6 @@ const KNOWN_SIGNED_IN: Record<string, [string, string]> = { | ||
| 38 | 38 | "etag /alice/notes/pulls/2": [CACHING, NO_ETAG], |
| 39 | 39 | "etag /settings": [CACHING, NO_ETAG], |
| 40 | 40 | "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"], | |
| 42 | 41 | }; |
| 43 | 42 | |
| 44 | 43 | let cookie = ""; |
new above
offline