bug(cdkTable & virtual scroll): Virtual scrolling in CDK table provides incorrect information to screen readers and causes focus/context loss during navigation
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- angular, typescript
- Bereich
- accessibility, frontend
Rechercherichtung
Beginnen Sie mit der Reproduktion des CDK table virtual-scrolling und dem verknüpften CDK table overview example, und verwenden Sie einen Screenreader, während Zeilen entfernt und gerendert werden. Untersuchen Sie die falsche Gesamtzeilenanzahl sowie Fokus- oder Kontextänderungen während der Navigation. Als abgeschlossen gilt die Arbeit, wenn Screenreader die tatsächliche Zeilenanzahl erhalten und die Navigation stabil bleibt, wenn der gerenderte Bereich aktualisiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
The recently introduced virtual scrolling support for CDK tables appears to have accessibility issues when used with screen readers.
Because rows are dynamically removed and added to the DOM, screen reader users can receive incorrect table information and lose their position while navigating through table content.
Impact
This issue significantly affects accessibility for users who rely on screen readers and may make large virtualized tables difficult or impossible to navigate reliably.
Reproduction
https://github.com/user-attachments/assets/e2afd2cd-d439-4be2-815b-47208ac93e5e
https://rc.material.angular.dev/cdk/table/overview#alternate-html-to-using-native-table
Steps to reproduce:
- Start a screen reader (e.g. NVDA, JAWS, or VoiceOver).
- Navigate to the table and begin reading/navigating through rows using screen reader table navigation commands.
- Continue navigating down the table until virtual scrolling is triggered and previously rendered rows are removed from the DOM while new rows are rendered.
Expected Behavior
Screen readers should be able to determine the actual total number of rows in the table, not only the rows currently rendered in the DOM.
Navigation through table rows should remain stable when virtual scrolling updates the rendered range.
Users should not unexpectedly jump to different data records while their screen reader focus remains on the same DOM row.
The virtual scrolling implementation should preserve a consistent and accessible experience for assistive technology users.
Actual Behavior
Current Behavior
Issue 1: Incorrect row count
Screen readers report an incorrect number of rows in the table.
Since only a subset of rows is rendered at any given time, assistive technologies may perceive only the currently rendered rows instead of the actual total number of rows in the dataset.
For example, a table containing thousands of rows may be announced as having only the number of rows currently present in the DOM.
Issue 2: Row content changes while screen reader focus remains on the same row
When navigating the table with a screen reader, virtual scrolling can remove rows from the beginning of the DOM and append new rows at the end.
Example:
The user navigates down to row 30.
Virtual scrolling is triggered.
Rows 1–10 are removed from the DOM.
Rows 31–40 are added.
The screen reader remains positioned on what it considers "row 30".
However, the DOM element representing that row may now contain different content than before. As a result, the user effectively jumps to another record without receiving clear feedback that the underlying content has changed.
This makes navigation confusing and can cause users to lose context within the table.
Environment
- Angular: 22
- CDK/Material: RC
- Browser(s): Chrome 149.0.7827.103
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 26.5.1 (25F80)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 96
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus angular/components
-
area: material/datepicker P4
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
angular/components#33763 · 2 Kommentare · 3 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: material/table P4
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
angular/components#33709 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: material/table docs gemini-triaged P4
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
angular/components#33455 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: material/core gemini-triaged P3
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
angular/components#33059 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: material/dialog P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
angular/components#30536 · 3 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in angular/components
Ähnliche Issues
-
priority: P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
prime-radiant-inc/evener#3291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug revealjs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
quarto-dev/quarto-cli#14961 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
supabase/agent-skills#614 ·
-
Content
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
RunestoneInteractive/rs#1559 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen