Skip to content

Fix virtualized QuickGrid ARIA row count - #70022

Merged
dariatiurina merged 1 commit into
dotnet:mainfrom
dariatiurina:dariatiurina-quickgrid-virtualized-row-count
Oct 30, 2026
Merged

dariatiurina merged 1 commit into
dotnet:mainfrom
dariatiurina:dariatiurina-quickgrid-virtualized-row-count

Conversation

@dariatiurina

@dariatiurina dariatiurina commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix virtualized QuickGrid ARIA row count

Keep virtualized QuickGrid's ARIA row count in sync with provider results.

Description

A virtualized QuickGrid updates its stored total when its provider completes, but Virtualize only rerenders its own rows. The ancestor table's aria-rowcount can therefore remain at 1 even after data rows load.

Request a QuickGrid render only when the conceptual body row count changes. Existing header, pagination and cancellation conventions remain unchanged. Add one Selenium regression using the existing virtualized test component with its provider-side StateHasChanged disabled, so an incidental ancestor render cannot mask the defect.

Validation performed locally with the checkout SDK activated:

  • dotnet build src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj --no-restore -v:q -p:UseIisNativeAssets=false - passed without and with the fix, zero warnings/errors.
  • dotnet test src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj --no-build --filter 'FullyQualifiedName~QuickGridTest.VirtualizedRowCountIncludesHeaderAfterLoading' --logger 'console;verbosity=normal' - failed as expected without the fix: expected row count 101, actual 1, after the first data row appeared.
  • dotnet test src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj --no-build --filter 'FullyQualifiedName~QuickGridTest' --logger 'console;verbosity=normal' - passed with the fix, 13/13 including the identical new regression.

The retained regression covers initial provider-driven virtualization on the BasicTestApp WebAssembly path; it does not assert screen-reader speech.

Fixes https://github.com/dotnet/aspnetcore-scenario-tests/issues/159

Render QuickGrid when its virtualized provider changes the conceptual row count, keeping the table attribute in sync with loaded rows.

Add one Selenium regression using the existing virtualized test component without its provider-side render notification.

Co-authored-by: Copilot App <[email protected]>
@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Oct 23, 2026
@dariatiurina dariatiurina self-assigned this Oct 23, 2026
@dariatiurina
dariatiurina marked this pull request as ready for review October 26, 2026 14:48
@dariatiurina
dariatiurina requested a review from a team as a code owner October 26, 2026 14:48
@dariatiurina
dariatiurina requested review from ilonatommy and a balanced review from Copilot October 26, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

No blocking defects were identified, but required source-verification and review checks remain incomplete.

No open issues 🎉

What changed in this PR

Fixes stale aria-rowcount values in virtualized QuickGrid tables by requesting a grid render when the conceptual body row count changes.

Changes:

  • Rerenders QuickGrid only when the row count changes, preserving existing pagination and cancellation logic.
  • Adds a test configuration that suppresses provider-triggered ancestor renders.
  • Adds a Selenium regression asserting that 100 loaded data rows produce an ARIA row count of 101, including the header.
File Description
src/​Components/​test/​testassets/​BasicTestApp/​QuickGridTest/​QuickGridVirtualizeComponent.razor Allows tests to disable provider-triggered rendering.
src/​Components/​test/​E2ETest/​Tests/​QuickGridTest.cs Adds coverage for the table’s row count after virtualized loading.
src/​Components/​QuickGrid/​Microsoft.AspNetCore.Components.QuickGrid/​src/​QuickGrid.razor.cs Requests a grid render when the conceptual body row count changes.

Review effort: Balanced

@dariatiurina
dariatiurina merged commit f00e4eb into dotnet:main Oct 30, 2026
33 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 5%

No docs needed: bug fix restoring expected ARIA row count behavior, with an E2E regression test.

Documentation surfaces considered

  • Conceptual article: Not required — Bug fix to virtualized QuickGrid aria-rowcount; no public API or documented behavior change.
  • Migration guidance: Not required — No upgrade action needed.
  • Breaking change: Not required — No compatibility impact.

@ilonatommy

Copy link
Copy Markdown
Member

/backport to release/11.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 4, 2026
wtgodbe pushed a commit that referenced this pull request Nov 6, 2026
* Fix virtualized QuickGrid ARIA row count (#70022)

* Fix QuickGrid backport test configuration

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Daria Tiurina <[email protected]>
Co-authored-by: Copilot App <[email protected]>

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 540dfd8e Deployed Oct 30, 2026 by dariatiurina via conclusion #132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants