Skip to content

Fix validation summary list semantics in Blazor Identity pages - #68913

Merged
wtgodbe merged 1 commit into
dotnet:release/11.0from
snemeckayova:snemeckayova/#67614-validation-summary-list-semantics
Sep 1, 2026
Merged

wtgodbe merged 1 commit into
dotnet:release/11.0from
snemeckayova:snemeckayova/#67614-validation-summary-list-semantics

Conversation

@snemeckayova

Copy link
Copy Markdown
Contributor

Description

Moves the alert role from each ValidationSummary, which renders as a ul, to an aria-atomic wrapper. This preserves the implicit list and listitem semantics while continuing to announce validation errors.

Fixes #67614

Customer Impact

Blazor Web Apps created with Individual Accounts no longer produce invalid ARIA markup for validation summaries. Assistive technologies can correctly identify both the validation alert and its list of errors.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@snemeckayova
snemeckayova requested review from Youssef1313 and javiercn and a lite review from Copilot August 31, 2026 12:02
@snemeckayova
snemeckayova requested a review from a team as a code owner August 31, 2026 12:02

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.

🟢 Approval recommended

Pull request overview

This PR fixes an accessibility issue in the Blazor Web App “Individual Accounts” scaffolded Identity pages where <ValidationSummary> renders a <ul>, and previously received role="alert" via additional attributes—overriding its implicit list semantics and producing invalid ARIA markup. The change preserves list/listitem semantics by moving the live-region semantics to a wrapper element while still announcing validation errors.

Changes:

  • Replaced role="alert" on <ValidationSummary> with a surrounding <div role="alert" aria-atomic="true">.
  • Applied this update consistently across the affected Identity Account pages (login, registration, recovery, and manage pages).
File summaries
File Description
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ResetPassword.razor Wraps the validation summary in an alert live region without overriding <ul> semantics.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ResendEmailConfirmation.razor Moves role="alert" off the <ul>-rendering component to a wrapper.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Register.razor Preserves validation list semantics while keeping error announcements.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/SetPassword.razor Uses an alert wrapper around validation summary for correct ARIA/list behavior.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/RenamePasskey.razor Ensures <ValidationSummary> keeps implicit list semantics by removing role="alert".
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/Index.razor Applies the wrapper-based live region approach to profile validation errors.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/EnableAuthenticator.razor Wraps the summary in an alert region while keeping the <ul> role intact.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/Email.razor Corrects ARIA semantics for the validation summary while preserving announcements.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/DeletePersonalData.razor Moves alert semantics to a wrapper so the summary remains a valid list.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Manage/ChangePassword.razor Prevents invalid role="alert" usage on the <ul> rendered by ValidationSummary.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/LoginWithRecoveryCode.razor Updates summary markup to maintain list semantics while announcing errors.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/LoginWith2fa.razor Applies the wrapper alert pattern for the validation summary.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/Login.razor Fixes the invalid ARIA role on the validation summary’s <ul> by using a wrapper.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ForgotPassword.razor Preserves list/listitem semantics for validation errors while keeping alert behavior.
src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWebCSharp.1/Components/Account/Pages/ExternalLogin.razor Moves alert semantics to a wrapper to avoid overriding <ul> roles.
Review details
  • Files reviewed: 15/15 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@Youssef1313 Youssef1313 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@snemeckayova snemeckayova added the Servicing-consider Shiproom approval is required for the issue label Aug 31, 2026
@snemeckayova
snemeckayova requested a review from artl93 August 31, 2026 13:31

@artl93 artl93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Accessibility. Approved.

@snemeckayova / @javiercn - do we need a wider pass on accessibility?

@javiercn

javiercn commented Sep 1, 2026

Copy link
Copy Markdown
Member

@artl93 these issues come from an accessibility pass I did for all the UI components on ASP.NET. We are working on getting these checks automated so they run as part of each build in 12+.

@artl93 artl93 added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Sep 1, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hi @snemeckayova. 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.

@wtgodbe
wtgodbe merged commit 7acf230 into dotnet:release/11.0 Sep 1, 2026
42 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc2 milestone Sep 2, 2026
wtgodbe added a commit that referenced this pull request Sep 2, 2026
* Fix validation summary list semantics (#68913)

* Fix LoginWith2fa remember-machine checkbox label association (#68844)

* Remove LoginWith2fa remember-machine checkbox label association

* Formatting fix

* Remove test

* Fix installer background for bundles (#68931)

---------

Co-authored-by: Soňa Nemečkayová <[email protected]>
Co-authored-by: William Godbe <[email protected]>
Co-authored-by: Youssef Fahmy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: scaffolded Identity validation summary produces an invalid ul with role=alert

6 participants