angular / angular/components

bug(Chip - chip-grid): Error not announced in screen readers on blur

未关闭
#28,940 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/chips P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### 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

Due to timeout on `_blur()` function in `chip-grid.ts` the errors that are shown are not announced.
https://github.com/angular/components/blob/main/src/material/chips/chip-grid.ts#L407

![image](https://github.com/angular/components/assets/116736167/27a31548-6cf9-495c-9ab0-37e0930c1e74)

### Reproduction

StackBlitz link: https://stackblitz.com/edit/qmuavp-wu5wvf?file=src%2Fexample%2Fchips-form-control-example.html
Steps to reproduce:
1. Add required form control
2. Blur from the input

### Expected Behavior

Screen reader should read the error shown on blur.

### Actual Behavior

Screen reader isn't reading the error shown on blur.

### Environment

- Angular: "^17.3.0"
- CDK/Material: "17.3.1"
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

贡献指南

打开贡献指南

调研方向

从 src/material/chips/chip-grid.ts 大约第 407 行开始,使用必填表单控件通过链接的 StackBlitz 示例重现该问题。跟踪 _blur() 的超时,并验证失去焦点后显示的错误是否会由屏幕阅读器播报。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
accessibility, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。