angular / angular/components

Queue messages sent to LiveAnnouncer

Ouverte
#17,852 7 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
area: cdk/a11y feature G needs: discussion P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser l’implémentation existante de LiveAnnouncer et examiner la reproduction StackBlitz liée. Déterminez comment les annonces mises en file d’attente doivent s’articuler avec le comportement actuel à élément unique et si l’implémentation avec file d’attente le remplace ou peut être sélectionnée. Le travail est considéré comme terminé lorsque les messages consécutifs et répétés sont annoncés dans l’ordre et que la décision de conception est prise.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
accessibility
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.