bug(mat-error): mat-error presentation is announces twice with NVDA screen reader
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### Is this a regression?
- [x] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
@angular/material 18.1.0 did not have this behavior
### Description
Hi,
I am using NVDA v2025.3 (latest version) for accessibility testing and have noticed that the mat-error presentation is announced twice by the screen reader.
The above example demonstrates the issue from the angular material docs:
https://material.angular.dev/components/form-field/overview#error-messages
### Reproduction
Steps to reproduce:
1. Open screen reader and set focus on an angular material mat-form-field with mat-error presented on blur
2. Tab away from the field to trigger error message presentation
3. Observe announcements and notice that mat-error text is read twice.
### Expected Behavior
mat-errors should only be announced a single time by the screen reader.
### Actual Behavior
mat-error is announced twice by the screen reader.
### Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
贡献指南
调研方向
从报告中链接的 Angular Material form-field 错误消息示例开始,使用 NVDA 重现该行为,重点关注字段失去焦点时显示的错误。将播报与预期的单次读取进行比较,并确定涉及的 form-field 错误呈现路径;完成的标准是 mat-error 只播报一次,且不回归文档所述的行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- accessibility, frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100