feat(accessibility): add terminal screen reader mode - #245
Conversation
johannesjo
left a comment
There was a problem hiding this comment.
Important — include the new preference in the autosave snapshot
I double-checked the current head and reproduced this against persistedSnapshot(): once the initial startup autosave has completed, changing only terminalScreenReaderMode leaves the snapshot unchanged, so setupAutosave() does not schedule its 1-second saveState().
Normal window close explicitly awaits saveState(), so clean restarts are covered. However, a crash or hard termination before another tracked/direct save can revert an enable or resurrect a previously enabled value.
saveState() already serializes the field at src/store/persistence.ts:186. Please add terminalScreenReaderMode: store.terminalScreenReaderMode beside terminalFont in src/store/autosave.ts, plus a regression test in src/store/autosave.test.ts asserting that toggling it changes persistedSnapshot().
The xterm constructor/live-update wiring and strict load validation otherwise check out, and CI/full tests pass.
|
Addressed the autosave gap in Validation: 96 focused store tests and 1,634 full-suite tests passed; compile, typecheck, ESLint, Prettier, Knip, and dependency-cruiser passed. |
|
Reviewed at Verified
Nits
Behavioural caveat (not a code issue)The accessibility tree mirrors only the viewport of the active buffer, and the live region cuts a batch off at 21 lines with a "too much output" message. Claude Code runs on the alternate buffer and redraws continuously, so announcements will be chatty during streaming. Arrow-key navigation still reaches scrollback via xterm's boundary-focus scrolling. That's inherent to the xterm approach the issue asked for — just calibrating expectations, nothing to change here. |
Summary
screenReaderModeand update open terminals when the setting changesValidation
npm run checknpm run check:staticnpm run test:security-rulesnpm test(1,633 passed, 23 skipped)npm run build:frontendImplements the terminal screen-reader mode portion of #211.