Repository navigation
Empty the signup header's status message 5 seconds after it's said - #731
Conversation
The header's hidden live region kept its last message until the next one replaced it, so a screen reader user reading the page line by line met "Closed. People can't sign up now." and the like a second time. Each message now empties the region 5 seconds later; a new message restarts the wait, and the counter in the span's key still makes the same words said twice a new node. Fixes #655. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SToFLoLxxqWuuu9dzf
Tophat: passedI ran 38dd7a9 locally with The region is screen-reader only, so I read it in the page. A
I didn't check "Publish and share when you’re ready." by hand. It goes through the same For the owner (UX): nothing on screen changes. For screen-reader users, the hidden status message that says "Closed…", "Reopened…" or "Published…" now empties 5 seconds after it's said, so someone reading the page line by line afterwards doesn't hear it again. A new message restarts the 5 seconds. There are no before/after screenshots to compare, because the region is never visible. The timings in the table are the evidence. Screenshots are in https://claude.ai/code/session_016YZ9SVxHrBKSFp3E4KHL3q. Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The signup header's hidden live region now empties 5 seconds after each message. The change is one effect in HeaderAnnouncer: whenever said holds text, it starts a SAID_FOR_MS timer that sets the text to '' and keeps the counter. Each say() makes a new said tuple, so the effect's cleanup clears the old timer and a new message restarts the wait. Emptying returns early, so it doesn't schedule another timer, and unmounting clears the pending one. Because emptying keeps the counter and say() adds one, the span's key still changes for every message, so the same words said after the region emptied are a new node and get read again. All four messages go through the same say: Close and Reopen through the status effect, Published through ShareScope, and "Publish and share when you’re ready." through PublishButton. So one timer covers every message, as the issue chose. Every "Done when" item in #655 is met. The new fake-timer tests check 4,999 ms against 5,000 ms, Close signup's message, the restart, the same words said twice as a new node, and that no timer is left after unmount. The e2e checks that read the region are green in CI. CHANGELOG has a line under Unreleased › Changed.
Blocking (0)
Optional (0)
Earlier threads: none. Copilot couldn't review (quota).
Checks: CI is green on 38dd7a9 (lint-type-test, e2e, CodeQL). The tophat passed on 38dd7a9, the current head, so no runtime code has changed since. Locally I read the diff against the whole of HeaderAnnouncer.tsx and its two useAnnounce callers. I searched src/help, tests and docs for the four messages: only organizer.spec.ts and the close-or-reopen walkthrough read them, and both read the region right after the change. I also went through the repo checklist. None of it applies beyond the component: no schema, no policy, no new public-page JS.
Gate: owner (UX). Nothing on screen changes. For screen-reader users, the hidden "Closed…", "Reopened…", "Published…" and "Publish and share…" messages now empty after 5 seconds. Since the region is invisible, there are no before/after screenshots. The tophat's timing table is the evidence.
Session: https://claude.ai/code/session_016YZ9SSNrsRZZrFDwaYDcQc
Generated by Claude Code
|
Approved by the owner at Session: https://claude.ai/code/session_016YZ9SThuP4f9EqPuXJxbzJ Generated by Claude Code |
|
Not merged. One gate failed at
Everything else passed: Session: https://claude.ai/code/session_016YZ9SThuP4f9EqPuXJxbzJ Generated by Claude Code |
Resolves the CHANGELOG conflict by keeping both sides' entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SSQfXAGhADZNvVZqib
|
Merged
When CI is green on Session: https://claude.ai/code/session_016YZ9SSQfXAGhADZNvVZqib Generated by Claude Code |
|
Approved by the owner at Session: https://claude.ai/code/session_016YZ9SWMjmNQ6yBQBRQ7xLD Generated by Claude Code |
Fixes #655.
The problem
The signup header has one hidden live region (
HeaderAnnouncer) that says "Closed. People can’t sign up now.", "Reopened. People can sign up again.", "Published. Anyone with the link can sign up now." and "Publish and share when you’re ready." Nothing ever cleared it, so a screen reader read the message as it arrived, and someone then reading the page line by line met it a second time.The fix
src/components/signup/HeaderAnnouncer.tsx: an effect on the region's state starts a timer whenever it holds a message, and empties the textSAID_FOR_MS(5,000 ms) later. A new message changes the state, so the old timer is cleared and the wait starts again. Unmounting clears it too.keystill changes for each message: the same words said twice are a new node and are read again.No help page quotes these messages (checked
src/help), and nothing on screen changes.Tests
HeaderAnnouncer.test.tsx, with fake timers: the region still holds a message at 4,999 ms and is empty at 5,000 ms; Close signup's message empties the same way; a second message 4 s after the first restarts the wait; the same words said after the region emptied are a new node; and unmounting leaves no timer behind. With the clearing stubbed out, the first three fail.organizer.spec.tsandhelp/create-and-publish-a-signup.spec.tsread the region as soon as the change lands, well inside 5 s; CI runs them.pnpm lint && pnpm typecheck && pnpm knip && pnpm test: all pass (160 files, 2,026 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_016YZ9SToFLoLxxqWuuu9dzf