The Retry Never Got Announced: Debugging a Stuck aria-busy in a Streaming Chat
说明与用途
在聊天界面中,aria‑busy 在重试后未被清除,导致屏幕阅读器未能朗读完整答案。清除 aria‑busy 后问题得到解决。
问题
A screen reader silently ignored a retried message in a streaming chat, while the visible text appeared and the error message was announced.
结果
The bug was caused by leaving aria-busy set to true on the retried message, which prevented the live region from announcing it. Clearing aria-busy on all code paths resolved the issue.
工作流
- 1. User submits a prompt and the client streams tokens into a message element with aria-busy="true".
- 2. The stream fails mid‑sentence and emits an error event; the message element remains busy.
- 3. User clicks Retry, triggering a new stream that completes successfully.
- 4. The client never clears aria-busy on the retried message, so the live region stays busy and the retried text is not announced.
证据
During the retry: nothing.
The live region was present, correctly labelled, and working on the happy path.
The buggy client, in eleven lines
- 记录日期: 2026-10-19T08:41:02.711Z