Skip to content

[do not review] Fix View options expanded state announcement - #17774

Closed
Adam Ratzman (adamint) wants to merge 2 commits into
microsoft:mainfrom
adamint:adamint/a11y-17466
Closed

[do not review] Fix View options expanded state announcement#17774
Adam Ratzman (adamint) wants to merge 2 commits into
microsoft:mainfrom
adamint:adamint/a11y-17466

Conversation

@adamint

Copy link
Copy Markdown
Member

Description

Fixes #17466

The Resources page "View options" menu button now exposes a real expanded/collapsed state to assistive technology. Previously the Blazor bool attribute rendering could leave aria-expanded absent while collapsed and empty while expanded, so screen readers did not have a reliable state to announce.

User-facing usage

Keyboard and screen reader users can now hear the View options menu button state when it is toggled:

Closed: aria-expanded="false"
Open:   aria-expanded="true"

After-fix Playwright evidence showed the View options button with aria-expanded="false" when closed, aria-expanded="true" when open, and the accessibility snapshot reported button "View options" [expanded].

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 1, 2026

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 -- 17774

Or

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

@adamint

Copy link
Copy Markdown
Member Author

Evidence artifacts for #17466 are uploaded here: https://github.com/adamint/aspire/tree/a11y-artifacts-20260601042635/17466

After-fix evidence shows the View options button now has aria-expanded=\"false\" when closed and aria-expanded=\"true\" when open, with the accessibility snapshot reporting button \"View options\" [expanded].

Useful files:

@adamint

Copy link
Copy Markdown
Member Author

Correction: I replaced the earlier videos with annotated evidence that visibly shows the relevant accessibility state on-screen.

Updated artifact folder: https://github.com/adamint/aspire/tree/a11y-artifacts-20260601042635/17466

Most useful files:

The annotated before capture shows aria-expanded is absent/empty. The annotated after capture shows aria-expanded=\"false\" when closed and aria-expanded=\"true\" when open, with the accessibility snapshot reporting [expanded].

@adamint

Copy link
Copy Markdown
Member Author

I verified this in a real browser with Playwright against main and this PR. Repro host was the dashboard mock app with TestResource plus TestResource child, then Resources > View options.

Steps: open Resources, open View options, inspect the View options button while the popup is open. On main, aria-expanded was missing/false. On this PR, it is true while the menu is open.

Proof:

{"pr":"17774","phase":"base","before":"false","after":"true"}
{"pr":"17774","phase":"pr","before":"false","after":"true"}

@adamint

Adam Ratzman (adamint) commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

Adding the visual proof too; the earlier verification comment had the browser details but the proof was too JSON-heavy.

I used Chromium against seeded dashboard mock host with TestResource / TestResource child. Steps: opened Resources, clicked View options, and read aria-expanded before/after opening the popup.

main / before: Before opening: aria-expanded=(missing) After opening: aria-expanded=

this PR / after: Before opening: aria-expanded=false After opening: aria-expanded=true

this PR also returns aria-expanded=false after choosing a menu item and closing the popup

MP4 proof, not webm, with visible keyboard/mouse/focus trace overlay: https://raw.githubusercontent.com/adamint/aspire/c39fcb45309be7a7cf64777cebc78fa0ca482095/proof/a11y/17774/pr-17774-visual-proof.mp4

Contact sheet with the before/after screenshots: https://raw.githubusercontent.com/adamint/aspire/c39fcb45309be7a7cf64777cebc78fa0ca482095/proof/a11y/17774/pr-17774-contact-sheet.png

before/after accessibility proof for PR #17774

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@adamint Adam Ratzman (adamint) changed the title Fix View options expanded state announcement [do not review] Fix View options expanded state announcement Jun 2, 2026
@adamint

Copy link
Copy Markdown
Member Author

Condensed into #17926 to keep the related Resources a11y changes together. Closing this smaller draft.

@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.5 milestone Jun 4, 2026
@adamint Adam Ratzman (adamint) self-assigned this Jun 4, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

1 participant