Skip to content

[release/11.0] Use h1 heading in Blazor NotFound.razor template page - #70309

Merged
wtgodbe merged 1 commit into
release/11.0from
backport/pr-70305-to-release/11.0
Nov 13, 2026
Merged

wtgodbe merged 1 commit into
release/11.0from
backport/pr-70305-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #70305 to release/11.0

/cc @dariatiurina

Use h1 heading in Blazor NotFound.razor template page

Update Blazor NotFound.razor template and sample pages to use <h1>.

Description

FocusOnNavigate in the Blazor Web App and Standalone Blazor WebAssembly project templates is configured with Selector="h1" in Routes.razor and App.razor, while NotFound.razor rendered <h3>Not Found</h3> without an <h1> element. As a result, navigating to /not-found had no matching h1 focus target for FocusOnNavigate to focus.

This change updates NotFound.razor in the Blazor project templates (BlazorWeb-CSharp and ComponentsWebAssembly-CSharp) and the corresponding template samples (BlazorWebAppPerPage, BlazorWebAppGlobal.Client, and BlazorWebAssemblyStandalone) to render <h1>Not Found</h1> so the page provides a matching h1 heading target for FocusOnNavigate.

Relates to dotnet/aspnetcore-scenario-tests#165

Customer Impact

Keyboard and screen-reader users navigating to the Not Found route (/not-found) in newly created Blazor Web App and Standalone Blazor WebAssembly projects do not have focus moved to the destination page heading because FocusOnNavigate (Selector="h1") cannot find a matching <h1> element on NotFound.razor.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Single-element markup update (<h3> to <h1>) in NotFound.razor across the Blazor project templates and template samples.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@github-actions
github-actions Bot requested a review from a team as a code owner November 4, 2026 14:48
@dariatiurina dariatiurina self-assigned this Nov 4, 2026
@PureWeen

PureWeen commented Nov 4, 2026

Copy link
Copy Markdown
Member

/review

@ilonatommy ilonatommy added area-blazor Includes: Blazor, Razor Components feature-accessibility This issue has accessibility impact labels Nov 4, 2026
@PureWeen

PureWeen commented Nov 5, 2026

Copy link
Copy Markdown
Member

Copilot's local review panel found no issues to raise at this commit.

@ilonatommy ilonatommy closed this Nov 5, 2026
@ilonatommy ilonatommy reopened this Nov 5, 2026
@dariatiurina dariatiurina added the Servicing-consider Shiproom approval is required for the issue label Nov 12, 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.

@dariatiurina dariatiurina added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Nov 13, 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.

@wtgodbe
wtgodbe merged commit fa613c2 into release/11.0 Nov 13, 2026
63 of 66 checks passed
@wtgodbe
wtgodbe deleted the backport/pr-70305-to-release/11.0 branch November 13, 2026 16:28

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 893a2d3f Deployed Nov 4, 2026 by ilonatommy via conclusion #2169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-reviewed-approved area-blazor Includes: Blazor, Razor Components feature-accessibility This issue has accessibility impact Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants