Public: anyone can read this; the crew can change it.
The live status line draws §5's badge, and .live-status leaves the markup #4251
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4240-the-live-status-line-draws-5-s-badge-and → main 1 commit fork
2 files
changed +12
−1
src/web/live.ts +1 −1
| @@ -65,7 +65,7 @@ export function liveMount(config: LiveConfig): Html { | ||
| 65 | 65 | data-app="${config.app ? "1" : ""}" |
| 66 | 66 | ></div> |
| 67 | 67 | <p |
| 68 | class="live-status" | |
| 68 | class="sr-only" | |
| 69 | 69 | id="live-status" |
| 70 | 70 | role="status" |
| 71 | 71 | aria-live="polite" |
test/live-pages.test.ts +11
| @@ -281,3 +281,14 @@ describe("the beat of a region with data-live-every", () => { | ||
| 281 | 281 | expect(cleared.length).toBe(0); |
| 282 | 282 | }); |
| 283 | 283 | }); |
| 284 | ||
| 285 | describe("the live mount's markup", () => { | |
| 286 | test("the status line is a polite region drawn with §5's .sr-only, and the pill keeps its words and link", async () => { | |
| 287 | const { liveMount } = await import("../src/web/live.ts"); | |
| 288 | const out = String(liveMount({ repo: "/a/b" })); | |
| 289 | expect(out).not.toContain('class="live-status"'); | |
| 290 | expect(out).toMatch(/<p\s+class="sr-only"\s+id="live-status"\s+role="status"\s+aria-live="polite"/); | |
| 291 | expect(out).toContain('id="live-pill"'); | |
| 292 | expect(out).toContain("New activity — refresh"); | |
| 293 | }); | |
| 294 | }); |
new above
offline