angular / angular/components

Focus trap focuses the wrong radio button if native radio button group is the first element in modal

Đang mở
#22,878 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: cdk/a11y P4
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

If the first focus-able element in a modal is a group of (native element, **not** Material) radio buttons, and one tabs off the end of the modal (triggering the focus trap and returning the focus to the top of the modal), the first radio button is always focused, even if the selected radio button is one of the later ones.

The expected behavior—found when tabbing to a group of radio buttons in other cases—is for focus to go to the selected radio button.

For now, our workaround is just to ensure there is always some other focus-able element at the top of the modal. A close button works well for this.

I could not find any issues relating to this.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện vấn đề với một modal có nội dung đầu tiên có thể nhận focus là một nhóm nút radio native, sau đó nhấn Tab để rời khỏi modal nhằm kích hoạt focus trap. Theo dõi hành vi focus trap của modal và cách xử lý focus của nhóm radio; hoàn tất khi focus quay lại nút radio đã chọn thay vì nút đầu tiên.

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

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
accessibility, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

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.