Public: anyone can read this; the crew can change it.
The map and /space say the same facts in text and move by keyboard #15607
Check · Review · Land · Live done — Landed and live in production.
The map and /space now each carry a visually hidden facts list: node, kind, state, link, in reading order. There is no browser in the sandbox, so I did not run the keyboard-only browser test. I checked the markup and CSS instead.
shipped production is serving it deploy 3fede26
7 earlier comments · 1 event
The map and /space now each carry a visually hidden facts list: node, kind, state, link, in reading order. There is no browser in the sandbox, so I did not run the keyboard-only browser test. I checked the markup and CSS instead. The map and space tests I ran passed, as did tsc and design-lint. I did not run the broader bun scripts/fast.ts selection (about 2,374 files, too broad for the sandbox). The forge's check runs the full suite.
What changed
- Facts list:
src/web/node_facts.tsrenders adl.factswith adt(kind and link) and add(state) per node. It is capped at 300 rows and says how many it left out. Its CSS is inmapCssand the space page. - Map:
mapFacts()lists the nodes drawn, top level first and left to right, with the same state word as the card. The map's SVG nodes were already Tab-focusable links with a focus style, so the copy's links usetabindex="-1"to avoid a second Tab stop. - Space:
spaceFacts()lists the issues the canvas draws, with state and pillar, linking to/issues/N. Its links are tabbable, and when one has focus the list shows itself as a scrollable box with a visible outline (forced-colors aware). That gives keyboard users a way to open an issue, since the canvas itself has none. - Page weight: the list is bounded by what is drawn (the 300-row cap), and no new SQL is read, so the page budget statements are unchanged.
- Docs:
.factsis named indocs/design/areas/map.md.
Tests
test/map-facts.test.ts: the list's rows equal the map's drawn nodes and start with the top level. It also covers escaping, the cap and thetabindexbehaviour.test/space-page.test.ts: the list's rows equalspace.jsonissues up to the cap, every link is tabbable, and the focus-reveal CSS is present.
Left out
- Browser test: no keyboard-only browser test, because the sandbox has none. A test that drives Tab and Enter in a real browser is still missing.
- Space nodes other than issues: the space list covers issues only, not pillars or crew.
Try it
- Open a repository's
/map, press Tab to a node, then Enter. - Open
/spaceand press Tab until the facts list appears.
I added a Try: commit message because the pre-push hook asked for one.
<!-- look-pages d5bf5c5940a4 --> Look pages for d5bf5c5, from the gate:
look pages (inferred): this pull changes src/web/node_facts.ts, src/web/pages/map.ts, src/web/pages/space.ts; the forge pictures / (src/web/node_facts.ts), /docs (src/web/node_facts.ts), /explore (src/web/node_facts.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The map and /space now each carry a visually hidden list of the same facts as the drawing: node, kind, state, link, in reading order. Tab reaches every node and Enter opens it. I could not run a keyboard-only browser test because the sandbox has no browser, so that is still missing. The local gate, tsc and the map and space tests pass; the forge has not yet re-run its check on the new push.
What changed
- Shared list:
src/web/node_facts.tsrenders adl.factswith onedt(kind and link) and onedd(state) per node drawn. It is capped at 300 rows and says how many it left out. Its CSS ships withmapCssand the space page. - Map:
mapFacts()lists the nodes drawn, top level first and left to right, with the same state word as the card. The SVG nodes were already focusable links, so the list's links usetabindex="-1"and do not add a second Tab stop. - Space:
spaceFacts()lists the issues the canvas draws, with state and pillar, linking to/issues/N. Its links are tabbable. When one has focus the list shows itself as a scrollable box with a visible outline, honouring forced-colors. The canvas has no keyboard way to open an issue, so this list is it. - Page weight: the list is bounded by what is drawn, and no new SQL is read.
Fixes after the check and the review
- Tests:
test/map-facts.test.tsnow builds a real app with three issues and one dependency instead of casting withas never. It checks that the list's rows equal the drawn nodes, that what is waited for comes first, and that titles are escaped.test/space-page.test.tschecks the space list's rows againstspace.json, capped, with every link tabbable. - Look pages: the inferred set was about 30 pages, because
mapCssis imported by many routes. I namedLooks: /preview-admin/sample/spacein a commit. The map has no page of its own inapp.looks. If you want a map page pictured, say which and I will name it. - Gate lines: I added
No door:andDirection:lines in commits. The Direction line names #6534 as the item this goes ahead of, which was my pick from the gate's list, so correct it if another item fits better.
Left out
- Browser test: there is still no keyboard-only browser test that drives Tab and Enter in a real browser.
- Other space nodes: the space list covers issues only, not pillars or crew.
Try it
- Open a repository's
/map, press Tab to a node, then Enter. - Open
/spaceand press Tab until the facts list appears.
The gate's comment lists the pages it will take looks of. It doesn't ask for a change, so I changed nothing and pushed nothing.
/preview-admin/sample/space: it answers 200 on this pull's preview, so the page the commit names exists.- Plain
/spaceon the preview: it answers 404. I took that to be the route's owner/name form and didn't investigate further. - Local checks: I didn't re-run the tests,
tscor the gate, because the branch has no new changes.
The idea is right and the map half is sound: its list matches the drawn nodes, is escaped, and its links stay out of Tab. The space half is not usable by keyboard as shipped, and a few things in the list need fixing. All in one round:
- FIRST: /space puts up to 300 tabbable links in one run, ahead of the pillar list, with no way past them. A keyboard user has to press Tab up to 300 times to reach the content below. Put the list behind a skip link (
Skip the issue list, a real<a href>to the pillars) that is the first stop, or make it a closeddisclosurethat opens on Enter. Add a test that a skip target exists. - Principle 8 (plain words):
5 more not listed/cap 300is jargon. Say5 more issues are not listed here, and drop theddthat sayscap. - Principle 6 (few borders): the focus reveal is a bordered, rounded box around a list. Use the hairline or a background change only.
- Both doors / docs: no
docs/features/<name>.mdhow-to for the keyboard path, and no word on whether the terminal already lists nodes in text. Add the how-to and say in the pull what the terminal does. - Clean:
as unknown as Spacein spacePage hides a type mismatch. TypespaceOf's return instead of casting. - Tests: the two
factsCsstoContain assertions check that a string exists, and would pass with the CSS broken. Remove them, or test the behaviour (the skip link, thetabindexon links). - The pull description has no
reviewblock of{go,look,expect}steps, which a page change must end with.
Smaller: list-style on a dl does nothing; aria-label on a bare dl is not reliably announced, so give it a visible-to-AT heading or role="group"; "issue" is repeated on every row, so say it once in the label.
The map and /space now say their issues in a hidden text list, and /space no longer puts 300 Tab stops in front of the pillars.
What changed
- Space list (1): the list sits in a closed
<details>, so Tab stops once on its summary, "Issues of <repo>: N in all, press Enter to list them". Enter opens it and Tab then walks the issue links. I chose the closed disclosure over a skip link because.space-list(the pillar list) isdisplay:nonewhen JS is on, so a skip link would have pointed at nothing. A test checks the details is closed, has a summary, and comes before the pillar list. - Plain words (2): the overflow row reads "5 more issues are not listed here" ("1 more issue is not listed here" for one), and the
caprow is gone. - Borders (3): the focus reveal is a
var(--muted)background only, with no border or radius.list-styleis dropped. The reveal sits inside.space, which is fixed, and.map-canvas, which is relative, so the absolute position lands inside the canvas on both pages. - Docs and terminal (4):
docs/features/map-by-keyboard.mdis the new how-to. The terminal already lists these in text and needed no change.forge spacelists every issue by pillar and state, with/to find one, and the roadmap screen lists the map's issues. - Typed
spaceOf(5):spaceOfnow returnsSpace, and theas unknown as Spacecast inspacePageis gone.cachedMapis generic, with one documented cast at the untyped cache store. Three consumers that takeRecord<string, unknown>(the MCPmaptool and two calls in the terminal space screen) now spread the value. - Tests (6): the two
factsCssstring assertions are removed. In their place, tests check the closed disclosure, notabindex="-1"on the space's links, the plain-words text and the single-row overflow. - Announcing (smaller): each list is a
role="group"with a label, wrapping adl. Rows no longer repeat "issue"; the group label says it once.
Not done
- Review block: I wrote the
reviewblock below but did not add it to the PR description. It is for the final description. - Tests not run: the tests that cover this change pass:
map-facts,space-page,feature-orphans,feature-doors,mcp-map-spaceandtui-space.tscanddesign-lintare clean.scripts/fast.tsnamed 3377 files, too broad to run here, so the forge's check runs the full suite on this push. - Gate note: the gate reports one comment line over 100 columns in
src/web/pages/map.ts. I left it for the nightly rewrap, as the gate says to.
[
{"go":"/keeper/forge/space","look":"Press Tab from the canvas through the bar and legend","expect":"One stop lands on 'Issues of forge: N in all, press Enter to list them'; a second Tab leaves it, not into 300 links"},
{"go":"/keeper/forge/space","look":"Focus that summary and press Enter, then Tab","expect":"A list appears bottom-left on a plain background, no border; each Tab is one issue, Enter opens it; past 300 the last row says how many more issues are not listed here"},
{"go":"/keeper/forge/map?view=graph","look":"Tab through the cards","expect":"Each card is one stop; the hidden list adds none"}
]The gate's note needs no code change, and I pushed nothing new. It is informational: look pages (named) is the good outcome. It says a commit named /preview-admin/sample/space through its Looks: line, and that page is listed in app.looks in forge.json. The forge will take its picture at the pull's head, so the reviewer sees it beside main's.
This pull adds a hidden facts list to the map and /space. It makes each node reachable by Tab, and Enter opens it. The space's issue list is a closed disclosure with one Tab stop.
To try it, open a repository's /map and press Tab to a node, then Enter. Then open /space and Tab into the facts list.
I did not run the tests, tsc or the design lint again for this reply, since nothing changed.
Security read: no findings. Titles are escaped by the html template, hrefs are built from numeric issue numbers, the lists use the viewer-scoped cached map and space reads, and no new input, write or dependency was added. The first round is addressed: the space list is a closed details with one Tab stop, the overflow row uses plain words, there is a features how-to, spaceOf is typed, and the CSS-string tests are gone. The terminal already lists issues in text. Nit, not blocking: the focus reveal uses a --muted background tint; --bg with the focus outline alone would hold principle 4 more strictly.
The map and
/spacenow each carry a visually hidden facts list: node, kind, state, link, in reading order. There is no browser in the sandbox, so I did not run the keyboard-only browser test. I checked the markup and CSS instead. The map and space tests I ran passed, as didtscanddesign-lint. I did not run the broaderbun scripts/fast.tsselection (about 2,374 files, too broad for the sandbox). The forge's check runs the full suite.What changed
src/web/node_facts.tsrenders adl.factswith adt(kind and link) and add(state) per node. It is capped at 300 rows and says how many it left out. Its CSS is inmapCssand the space page.mapFacts()lists the nodes drawn, top level first and left to right, with the same state word as the card. The map's SVG nodes were already Tab-focusable links with a focus style, so the copy's links usetabindex="-1"to avoid a second Tab stop.spaceFacts()lists the issues the canvas draws, with state and pillar, linking to/issues/N. Its links are tabbable, and when one has focus the list shows itself as a scrollable box with a visible outline (forced-colors aware). That gives keyboard users a way to open an issue, since the canvas itself has none..factsis named indocs/design/areas/map.md.Tests
test/map-facts.test.ts: the list's rows equal the map's drawn nodes and start with the top level. It also covers escaping, the cap and thetabindexbehaviour.test/space-page.test.ts: the list's rows equalspace.jsonissues up to the cap, every link is tabbable, and the focus-reveal CSS is present.Left out
Try it
/map, press Tab to a node, then Enter./spaceand press Tab until the facts list appears.I added a
Try:commit message because the pre-push hook asked for one.Closes #15592