Skip to content

Fix Dashboard HTML language under invariant culture - #19331

Merged
Adam Ratzman (adamint) merged 1 commit into
microsoft:mainfrom
adamint:adamint/fix-dashboard-html-lang
Aug 13, 2026
Merged

Adam Ratzman (adamint) merged 1 commit into
microsoft:mainfrom
adamint:adamint/fix-dashboard-html-lang

Conversation

@adamint

Copy link
Copy Markdown
Member

Description

The Dashboard accessibility outerloop tests rendered <html lang=""> when the process used invariant culture. Axe then reported html-has-lang across every scanned page, dialog, theme, and viewport.

This change maps invariant culture to lang="en", matching the Dashboard's English base resources, while preserving the name of every non-invariant UI culture.

The separate CLI E2E failure tracked by the same issue is also unblocked: after @playwright/[email protected] was seeded, the package downloads anonymously from the internal npm feed.

Test proof

CI-equivalent Dashboard accessibility coverage used the repository's bundled Chromium headless shell:

BROWSER_PATH="$PWD/artifacts/bin/playwright-deps/chromium_headless_shell-1187/chrome-mac/headless_shell" \
  dotnet test --project tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj \
  --no-build --no-launch-profile -- \
  --filter-class "*.AccessibilityTests" \
  --filter-not-trait "quarantined=true"
Test run summary: Passed!
  total: 19
  failed: 0
  succeeded: 19

Full non-outerloop Dashboard suite:

Test run summary: Passed!
  total: 1516
  failed: 0
  succeeded: 1516

Build:

Build succeeded.
    0 Warning(s)
    0 Error(s)

Internal feed verification:

npm pack --dry-run @playwright/[email protected]
filename: playwright-cli-0.1.18.tgz
package size: 30.9 kB
total files: 15

Fixes #18657

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Copilot AI balanced review requested due to automatic review settings August 13, 2026 03:50
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19331

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19331"

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.

Pull request overview

Fixes invariant-culture Dashboard pages rendering an empty HTML language attribute.

Changes:

  • Maps invariant culture to English while preserving named UI cultures.
  • Uses the helper for the Dashboard’s <html lang> attribute.
  • Adds focused regression tests.
Show a summary per file
File Description
src/Aspire.Dashboard/Components/App.razor Uses the culture-aware HTML language helper.
src/Aspire.Dashboard/Utils/GlobalizationHelpers.cs Adds invariant-culture fallback to en.
tests/Aspire.Dashboard.Tests/GlobalizationHelpersTests.cs Tests invariant and named cultures.

Review details

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

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

Copilot-Session: 20258179-a52e-4196-b70c-d294cf37f1f8
@adamint
Adam Ratzman (adamint) force-pushed the adamint/fix-dashboard-html-lang branch from 4666887 to b3e08e5 Compare August 13, 2026 03:57

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.

Reviewed the invariant-culture HTML language fix and its regression coverage. No issues found.

@adamint
Adam Ratzman (adamint) merged commit f242451 into microsoft:main Aug 13, 2026
363 checks passed
@github-actions github-actions Bot added this to the 13.6 milestone Aug 13, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.6 milestone Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ CI Failure Analysis: Possible Flaky Test(s)

The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests.

Suspected flaky test(s):

  • Aspire.Cli.Tests.Projects.ProcessGuestLauncherTests.LaunchAsync_WithGracefulServices_BlockingSignalerDoesNotConsumeGracefulBudget in job Tests / Cli / Cli (windows-latest)
    • Error: Expected process exit to win over the still-blocked signaler but it took 00:00:07.2027384.
    • Stack Trace (first frames):
      at Aspire.Cli.Tests.Projects.ProcessGuestLauncherTests.LaunchAsync_WithGracefulServices_BlockingSignalerDoesNotConsumeGracefulBudget() in D:\a\aspire\aspire\tests\Aspire.Cli.Tests\Projects\ProcessGuestLauncherTests.cs:line 192
      --- End of stack trace from previous location ---
      
    • Why likely flaky: Timing-sensitive assertion on process-exit-vs-signaler race under CI load. The test file is not touched by this PR (which only changes Dashboard globalization code), and this exact test has recurred multiple times previously under the same cause ID.

Suggested actions:

  • Re-run the failed CI jobs to confirm if the failure is intermittent
  • If the test continues to fail, consider quarantining it using /quarantine-test <test name> <issue URL>
  • Search existing issues to see if this test is already known to be flaky

You can re-run the failed jobs from the workflow run page.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures: Outerloop Tests

3 participants