angular / angular/components

bug(slide-toggle): no remaining focus if clicked on non active toggle

Đang mở
#26,489 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
area: material/slide-toggle 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ả

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

if a non focused toggle is clicked, there is no remaining focus - bad if keyboard control is used afterwards.
However if the label is clicked instead, the remaining focus works.
![toggle-focus](https://user-images.githubusercontent.com/27373333/214414034-91364c13-cf8f-4130-843d-a09f6f17f40a.gif)

### Reproduction

Steps to reproduce:
1. https://material.angular.io/components/slide-toggle/overview
2. click on not focused toggle vs click on not focused label

### Expected Behavior

remaining focus should appear on click on a non focused toggle

### Actual Behavior

no remaining focus on click on a not already focused toggle

### Environment

- Angular: 15.1.1
- CDK/Material: 15.1.1
- Browser(s): all
- Operating System (e.g. Windows, macOS, Ubuntu): all

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 hành vi tại URL tổng quan về slide-toggle bằng cách so sánh thao tác nhấp vào một toggle không được focus với thao tác nhấp vào label của nó. Theo dõi cách xử lý focus của slide-toggle và xác minh rằng việc nhấp vào một toggle không được focus vẫn giữ focus bàn phím hiển thị, đồng thời bảo toàn hành vi hiện có của label.

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
45/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.