angular / angular/components

LiveAnnouncer does not work when made inside a mat-dialog

Đang mở
#22,733 7 bình luận 3 reaction 1 người được giao Được @crisbeto nhận Xem trên GitHub
Accessibility area: cdk/a11y area: material/dialog P2
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ả

#### Reproduction

Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-fksfhp?file=src/app/dialog-content-example.ts

Steps to reproduce:
1. Open screen reader, I used mac voiceover. Everything below are done via screen reader.
2. Click on the "Open dialog" button to open dialog
3. Inside the dialog, click the "test" button which would make a live announcement.
4. It says "press test, button". No announcement made. If I open the inspector, the `cdk-live-announcer-element` region is correctly populated with the announcement text despite no actual announcement. In addition, if I move this div inside `` it would work but then this element becomes reacheable via screen reader.


#### Expected Behavior

What behavior were you expecting to see?

Make the announcement.

#### Actual Behavior

What behavior did you actually see?

No announcement even though `cdk-live-announcer-element` did get populated.

#### Environment

- Angular: "10.2.4"
- CDK/Material: "10.2.7"
- Browser(s): Chrome Version 90.0.4430.93
- Operating System (e.g. Windows, macOS, Ubuntu): macOS mojave 10.14.6

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

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

Đánh giá

Issue này chưa được đánh giá.

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.