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

Đang mở Phù hợp với người mới
#33,345 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
accessibility, frontend

Hướng nghiên cứu

Bắt đầu với apps/web/src/hooks/showThreadUndoNotice.ts, đặc biệt là undo() và refreshNotice(), rồi đọc các vị trí gọi từ bàn phím và nút trong AppSidebarLayout.tsx và SidebarThreadUndoNotice.tsx. Xác nhận cách thông báo được gửi và hủy, sau đó kiểm tra rằng việc hoàn tác từng thao tác thread được hỗ trợ sẽ phát thông báo xác nhận, đồng thời thông báo lỗi hiện có vẫn hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
8 giờ 26 phút
Pull request đã merge (30 ngày)
133

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.