bug(FormField): Tabbing to then out of form field with "required" validator shows validation error.
- 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
Premature error validation occurs when tabbing from the form field text entry section to the datepicker button. From an A11Y and usability perspective, this should not occur until the user has left the containing form field and button since the datepicker button is a valid way of filling out the form field.
### Reproduction
**StackBlitz link:** https://components-issue-zzukvj.stackblitz.io
**Steps to reproduce:**
1. Add Datepicker to app from angular material code example
2. Add required validator to form control
3. Tab from the form field section to the datepicker button
4. Error shows, despite not having left the control
### Expected Behavior
Required validation does not occur when tabbing from the text entry section of the datepicker to the calendar pop-out button.
It should only occur when tabbing out of the containing form field and button.
### Actual Behavior
Required error validation occurs when tabbing from the text entry section of the datepicker to the open calendar button
### Environment
- Angular: 15.2.4
- CDK/Material: 15.2.5
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS, Windows
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi trong StackBlitz được liên kết bằng Angular Material datepicker với một form control bắt buộc, sau đó kiểm tra phần triển khai của datepicker và form-field. Công việc được xem là hoàn tất khi việc nhấn Tab từ ô nhập văn bản đến nút lịch không hiển thị lỗi bắt buộc, trong khi việc rời khỏi cả hai vẫn kích hoạt quá trình xác thực.
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
- 35/100