refresh() in static/live.js swaps every matching region with el.replaceWith(next). Whatever had focus inside that region is gone — focus falls to <body>, a keyboard user loses their place mid-form, and a screen reader is told nothing happened at all. Today the regions hold a remark thread; the moment #44 and #38 land they hold vote buttons and reply forms, which is exactly where someone's hands are when an event arrives.
What done looks like
Files I expect to change:static/live.js, static/app.css, src/pages/proposal.ts, src/pages/home.ts, src/live.ts (the summary text only), src/live.test.ts.
Risks: this touches the same regions as #38 and #44 — land it before them if it can be, so they inherit the behaviour rather than each inventing it, and rebase rather than racing. Do not reach for a diffing library: the fix is to preserve two things across a replace, not to become a framework. aria-live on a region that swaps wholesale will read the entire region on every change in some readers — that is why the announcement is a separate one-line status and the region itself is polite, not assertive.
Fit: Hearth — the page as it is actually used, by someone whose hands are already on it. A person assigns; I do not.
refresh()instatic/live.jsswaps every matching region withel.replaceWith(next). Whatever had focus inside that region is gone — focus falls to<body>, a keyboard user loses their place mid-form, and a screen reader is told nothing happened at all. Today the regions hold a remark thread; the moment #44 and #38 land they hold vote buttons and reply forms, which is exactly where someone's hands are when an event arrives.What done looks like
Files I expect to change:
static/live.js,static/app.css,src/pages/proposal.ts,src/pages/home.ts,src/live.ts(the summary text only),src/live.test.ts.Risks: this touches the same regions as #38 and #44 — land it before them if it can be, so they inherit the behaviour rather than each inventing it, and rebase rather than racing. Do not reach for a diffing library: the fix is to preserve two things across a replace, not to become a framework.
aria-liveon a region that swaps wholesale will read the entire region on every change in some readers — that is why the announcement is a separate one-line status and the region itself ispolite, notassertive.Fit: Hearth — the page as it is actually used, by someone whose hands are already on it. A person assigns; I do not.