[Bug]: Undoing a thread action with Ctrl+Z gives no screen reader announcement

オープン 初心者向け
#33,345 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

まず apps/web/src/hooks/showThreadUndoNotice.ts、特に undo() と refreshNotice() を確認し、次に AppSidebarLayout.tsx と SidebarThreadUndoNotice.tsx のキーボードおよびボタンからの呼び出し箇所を読みます。アナウンスがどのように送信され、キャンセルされるかを確認してから、サポート対象の各スレッド操作を取り消すと確認のアナウンスが行われ、既存の失敗アナウンスも引き続き機能することを検証します。

索引モデルが issue の本文から書いたものです。

説明

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Turn on a screen reader (NVDA, JAWS, or VoiceOver).
  2. Settle, snooze, archive, or unpin a thread from the sidebar. You hear "Settled 1 thread, Ctrl+Z to undo".
  3. Within 5 seconds, press Ctrl+Z (or activate the "Ctrl+Z to undo" button in the sidebar footer).
Expected behavior

The screen reader confirms the undo, for example "Restored 1 thread" or "Unsettled 1 thread", so you know the shortcut worked and the thread is back.

Actual behavior

Nothing is announced. The thread is restored and the visible notice fades out, but a screen reader user gets no feedback and can't tell whether Ctrl+Z did anything. Pressing it again does nothing either, so the result is silent both times.

Only a failed undo is announced, through its error toast.

Cause. undo() in showThreadUndoNotice.ts clears the notice through refreshNotice() → setNotice(null), which calls cancelAnnouncement("thread-undo-notice") and announces nothing in its place. The keyboard path (AppSidebarLayout.tsx) and the button (SidebarThreadUndoNotice.tsx) both go through undoLatestThreadAction(), so both are silent.

A possible fix is to announce() a short confirmation from the same "thread-undo-notice" source when the undo runs, reusing the action and count the notice already has (Settled, Snoozed, Unpinned, Archived, Discarded).

Related: #31667 (the old "Ctrl+Z to undo" text stays in the live region afterwards), #23653.

Impact

Minor bug or occasional failure

Version or commit

main @ 965ddc1d6c

Environment

Windows 11, NVDA. Applies to web and desktop.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
8時間 26分
マージ済み PR(30日)
133

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。