[do not review] Restore focus after Resources view option selection - #17776
[do not review] Restore focus after Resources view option selection#17776Adam Ratzman (adamint) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17776Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17776" |
|
Evidence artifacts for #17656 are uploaded here: https://github.com/adamint/aspire/tree/a11y-artifacts-20260601042635/17656 After-fix evidence shows selecting Useful files:
|
|
Correction: I replaced the earlier videos with annotated evidence that visibly shows the active element before/after selecting the menu item. Updated artifact folder: https://github.com/adamint/aspire/tree/a11y-artifacts-20260601042635/17656 Most useful files:
The annotated before capture shows focus falls to |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
I verified this in a real browser with Playwright against Steps: open View options, activate a menu item, then wait for the popup to close and check Proof: {"pr":"17776","phase":"base","active":"Collapse child resources"}
{"pr":"17776","phase":"pr","active":"View options"} |
|
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 main / before: After selecting a menu item, focus is on: IntegrationTestApplication Resources Console Structured Traces Metricswarning Endpoint is unsecuredU this PR / after: After selecting a menu item, focus is on: View options MP4 proof, not webm, with visible keyboard/mouse/focus trace overlay: https://raw.githubusercontent.com/adamint/aspire/cd33e79ec249a7354240cc851b921502ada33d1a/proof/a11y/17776/pr-17776-visual-proof.mp4 Contact sheet with the before/after screenshots: https://raw.githubusercontent.com/adamint/aspire/cd33e79ec249a7354240cc851b921502ada33d1a/proof/a11y/17776/pr-17776-contact-sheet.png |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Condensed into #17926 to keep the related Resources a11y changes together. Closing this smaller draft. |

Description
Fixes #17656
The Resources page View options menu now returns keyboard focus to the View options button after a menu item is selected. Previously selecting an item could leave focus on
<body>, which made keyboard and screen reader users lose their place after the dynamic menu interaction.The focus restoration is opt-in on Aspire menu components and is enabled only for the Resources View options menu. Other menus keep their existing behavior so item handlers that intentionally move focus, such as chat model selection or dialogs, are not overridden.
User-facing usage
After selecting a View options item such as Collapse child resources, focus remains on the View options button instead of moving out of the page. After-fix Playwright evidence captured:
{ "selectedItemText": "Collapse child resources", "after": { "tagName": "FLUENT-BUTTON", "ariaLabel": "View options", "isBody": false } }Checklist
<remarks />and<code />elements on your triple slash comments?