Skip to content

[release/11.0] Give QuickGrid paginator navigation an accessible name - #70093

Merged
wtgodbe merged 2 commits into
release/11.0from
backport/pr-70002-to-release/11.0
Nov 4, 2026
Merged

wtgodbe merged 2 commits into
release/11.0from
backport/pr-70002-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #70002 to release/11.0

/cc @ilonatommy @snemeckayova

Give QuickGrid paginator navigation an accessible name

Name paginator landmarks and enable application-specific accessible names.

Description

QuickGrid’s Paginator currently renders an unnamed navigation landmark. This change supplies the default accessible name "Pagination" and adds a public AdditionalAttributes parameter so applications can name the internal navigation element using aria-label or aria-labelledby.

The attribute-forwarding API is necessary to address the multiple-grid scenario, not merely an optional extension to the default-label fix. A fixed "Pagination" label would leave paginators for different grids indistinguishable by name. Applications need to supply contextual names, such as "Orders pages" and "Customers pages", or reference existing headings.

This follows the established implementation in other ASP.NET Core components. The following precedents already exist on the backport branch:

  • QuickGrid itself exposes the exact same parameter declaration in

    /// <summary>
    /// Gets or sets a collection of additional attributes that will be applied to the created element.
    /// </summary>
    [Parameter(CaptureUnmatchedValues = true)] public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }

    It forwards these attributes to its <table> through AdditionalAttributes:

    <table theme="@Theme" aria-rowcount="@(_ariaBodyRowCount + 1)" @ref="_tableReference" @onclosecolumnoptions="HideColumnOptionsAsync" @attributes="AdditionalAttributes" class="@GridClass()">

  • NavLink exposes the same public dictionary parameter, documented as attributes added to the generated <a> element

    /// <summary>
    /// Gets or sets a collection of additional attributes that will be added to the generated
    /// <c>a</c> element.
    /// </summary>
    [Parameter(CaptureUnmatchedValues = true)]
    public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }
    .

  • InputBase exposes the same public parameter

    /// <summary>
    /// Gets or sets a collection of additional attributes that will be applied to the created element.
    /// </summary>
    [Parameter(CaptureUnmatchedValues = true)] public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }

    InputText forwards it to the actual <input> using builder.AddMultipleAttributes(1, AdditionalAttributes), allowing applications to provide accessible names and descriptions.

The backport therefore applies an existing component convention to a missing accessibility customization point rather than introducing a new configuration mechanism.

Fixes dotnet/aspnetcore-scenario-tests#152.

Customer Impact

Screen-reader users can move between navigation regions using a list of their names. Without a name, users cannot tell which region contains the pagination controls. If paginators for different grids all have the same name, users cannot tell which grid each paginator controls.

The W3C ARIA Authoring Practices Guide, “Landmark Regions,” Step 3 states:

“If a specific landmark role is used more than once on a page, provide each instance of that landmark with a unique label.”

The guidance permits the same label for identical pagination controls above and below the same table. That exception does not address paginators controlling different content.

“There is one rare circumstance where providing the same label to multiple instances of a landmark can be beneficial: the content and purpose of each instance is identical. For example, a large search results table has two sets of identical pagination controls -- one above and one below the table, so each set is in a navigation region labelled Search Results.”

Using multiple QuickGrids on one page is a fully supported scenario (e.g. a dashboard with a separate Orders and Customers grid).

Without this backport, applications on .NET 11 cannot supply either naming attribute to Paginator through a supported component parameter. Adding only the default label would still leave those applications unable to follow the distinct-label guidance for different grids. The public parameter is the established Blazor mechanism for closing that gap and also permits localized names.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

It does not change paging logic, control behavior, layout, or styling for existing callers. Applications that do not supply additional attributes receive the default name.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

snemeckayova and others added 2 commits October 29, 2026 16:39
Consolidate naming scenarios into one test per navigation mode and reuse the existing paginator for heading-based naming via a test button.

Co-authored-by: Copilot App <[email protected]>
@github-actions
github-actions Bot requested a review from a team as a code owner October 29, 2026 16:39
@snemeckayova snemeckayova self-assigned this Oct 30, 2026
@ilonatommy ilonatommy added feature-accessibility This issue has accessibility impact feature-blazor-quickgrid labels Oct 30, 2026
@ilonatommy ilonatommy added area-blazor Includes: Blazor, Razor Components Servicing-consider Shiproom approval is required for the issue labels Oct 30, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@ilonatommy

ilonatommy commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

/ba-g The failure is "Detected modification to baseline API files. PublicAPI.Shipped.txt files should only be updated after a major release, and PublicAPI.Unshipped.txt files should not be updated in release branches."

Consulted with tactics: "Compliance, low risk - approved for Dec servicing" under the condition of getting a second PR review and updating appropriate documentation / API ref docs (dotnet/AspNetCore.Docs#38069).

@ilonatommy ilonatommy added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Nov 2, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed.

@ilonatommy

Copy link
Copy Markdown
Member

Waiting for information how to handle public API warnings, to not pollute the CI after this one gets merged.

@ilonatommy

Copy link
Copy Markdown
Member

Waiting for information how to handle public API warnings, to not pollute the CI after this one gets merged.

We can merge it as is.

@wtgodbe
wtgodbe merged commit 59759bb into release/11.0 Nov 4, 2026
59 of 65 checks passed
@wtgodbe
wtgodbe deleted the backport/pr-70002-to-release/11.0 branch November 4, 2026 06:24

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 218f1e4c Deployed Oct 30, 2026 by ilonatommy via conclusion #2022
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 feature-accessibility This issue has accessibility impact feature-blazor-quickgrid Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants