Public: anyone can read this; the crew can change it.
Every page works with a keyboard and a screen reader, and a test fails when a field loses its label or a page its heading #78
Check · Review · Land · Live done — Landed and live in production.
src/a11y.test.ts now fails if a page loses a label, a heading or a link's name. The rest of the issue is done too. The full bun test run (255 tests) and bun run lint:design both passed.
shipped production is serving it deploy d2eada7
Box 4 is not met. static/live.js refreshes a region with el.replaceWith(next), so the whole aria-live element is swapped for a new node on each refresh. Screen readers reliably announce changes inside an existing live region. They often say nothing when a new live region is inserted already filled. As written, the polite announcement is mostly decoration.
Fix: put a persistent live container outside the replaced nodes. For example, add one visually-hidden <div id="live-status" role="status" aria-live="polite"> to the layout. After a swap, live.js writes a short message into it, such as "Clock updated". Or change the swap to replace the region's children (el.replaceChildren(...next.childNodes)) so the live element persists. Then drop aria-live from the big section wrappers: today it would read out whole sections, including the deal page's #deal div, on every change.
The test only checks that the attribute is present, so it passes whichever way the region is swapped. Extend it to assert the persistent region exists, or that live.js does not replace the live element itself. Keep the assertion that live.js never calls .focus(.
Boxes 1, 2, 3 and 5 look met: the skip link is first in the body and targets <main id="content">, the parser self-test is good, and the pages are checked. I did not check whether the preview shows the skip link on focus. Box 3's :focus-visible rule was already in app.css; the skip link is the only addition. The change loosens no contract.json cell, adds no new door, and adds no dependency.
I took the review's suggested fix for live announcements. Live changes now go through one hidden status region that is never swapped out, instead of aria-live on the sections live.js replaces. The full bun test run (255 tests) and bun run lint:design pass. I haven't checked the preview.
- Status region: the layout renders
<div id="live-status" role="status" aria-live="polite">once, visually hidden through a new.visually-hiddenclass. Pages without live regions, and the plain page, don't get it. - Announcement: after
live.jsswaps the regions, it clears the status text and writes "Updated" into it. Clearing first means two refreshes in a row are both announced. Focus is still never moved. - Sections: I removed
aria-livefrom thedata-livesections insrc/pages/clock.tsandsrc/pages/deal.ts, so they no longer read out whole. - Test:
src/a11y.test.tsnow asserts that:
- no data-live element carries aria-live;
- the persistent #live-status region exists on the clock;
- live.js writes to it;
- live.js never calls .focus(.
The announcement text is the generic "Updated", not the specific "Clock updated" the review gave as an example. live.js can't tell which page it is on without extra plumbing.
🤖 Generated with Claude Code
The earlier ask is met: live changes now go through one persistent #live-status region (role=status, aria-live=polite) that live.js writes to, no data-live section carries aria-live, and focus is never moved. The preview serves the skip link and main#content. The a11y test covers the pages listed plus people, profile and reminders, and the parser has its own self-test. No security, contract or dependency changes.
src/a11y.test.tsnow fails if a page loses a label, a heading or a link's name. The rest of the issue is done too. The fullbun testrun (255 tests) andbun run lint:designboth passed. I didn't runbun x tsc --noEmit: it printed its help text instead of checking, so the type check didn't run here.What changed
?q=and no match, a deal page, the client timeline, new deal, a refused page and the signed-out welcome page. I also added People, Profile and Review today's reminders, which the issue didn't list.-
<html lang>is set. - There is exactly one<h1>, and heading levels never skip. - Every non-hidden input, select and textarea has a label (for, wrapping oraria-label). - Every button and link has text or anaria-label. - Notabindexabove 0. - Ids are unique on the page.:focus-visible.src/pages/layout.tsnow puts "Skip to content" first in the body, pointing at<main id="content">.static/app.csshides it off-screen until it has focus. It uses existing tokens, solint:designpasses. The global:focus-visibleoutline was already there and I left it.data-liveregions insrc/pages/clock.tsandsrc/pages/deal.tsnow carryaria-live="polite".live.jsnever moves focus, and the test checks it has no.focus(call.I didn't touch
contract.json, and no policy cell changed. I made no new component class, so there are nodocs/design/areasedits.scripts/gate.tsandscripts/fast.tsdon't exist in this repo, so I ran the whole suite instead.When #30 or #42 lands a new page or form, add its path to the
pageslist in the test.🤖 Generated with Claude Code
Closes #47