angular / angular/components

Queue messages sent to LiveAnnouncer

未关闭
#17,852 7 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/a11y feature G needs: discussion P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Feature Description

LiveAnnouncer should be able to queue multiple messages and announce them one by one instead of announcing only the lates message.

#### Use Case

See https://stackblitz.com/edit/angular-b4jomd, it has a button which announces two messages "Table Foo was updated" and "Table Bar was updated" on click. It illustrates two use cases:

1) Simultaneous announcements. Current implementation of LiveAnnouncer uses a single DOM element for the announcement, so second message overrides the first one and screen reader users hear only the second message.

2) Consequent announcement of the same message. Current implementation will announce only distinct messages, i.e. clicking the button multiple times will produce only one message for the screen reader. That's not always convenient. For example, if you have a table on the page and you do some polling which updates the table 5 times, we need to be able to announce every of those updates so that screen reader users know what's happening on the page.

#### Implementation

We already have an implementation of a queued LiveAnnouncer which was used in GCP for the last 5 months, it alowed to fix a lot of accessibility problems on pages with heavy UIs. I will convert it to a PR here, but I'd like to have some discussion first. At the very least I'd like to know whether it should replace the existing LiveAnnouncer implementation or we should allow users to switch between two implementations

贡献指南

打开贡献指南

调研方向

首先定位现有的 LiveAnnouncer 实现,并查看链接的 StackBlitz 复现。确定排队的播报应如何与当前的单元素行为关联,以及排队实现是替代它,还是可以选择使用。连续消息和重复消息能够按顺序播报,并且设计决策得到解决,即表示完成。

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

评估

技术栈
angular, typescript
领域
accessibility
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

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