Skip to content

[do not review] Fix Resources grid keyboard activation - #17789

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

[do not review] Fix Resources grid keyboard activation#17789
Adam Ratzman (adamint) wants to merge 2 commits into
microsoft:mainfrom
adamint:adamint/a11y-17651

Conversation

@adamint

@adamint Adam Ratzman (adamint) commented Jun 1, 2026

Copy link
Copy Markdown
Member

Description

Fixes #17651.

Stops the Resources grid row keyboard handler from also opening row details when Enter originates on an interactive control inside the row, such as "Open in text visualizer". The new Resources-page JS module scopes the behavior to the Resources grid, registers current and virtualized interactive descendants, stops only unmodified Enter so Tab/arrows/Escape/shortcuts keep bubbling, and unregisters the listener during disposal.

Evidence: before/after screenshots and videos are linked in the artifact branch: https://github.com/adamint/aspire/tree/a11y-artifacts-20260601042635/17651

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

Stop Resources grid row activation from handling unmodified Enter events that originate on interactive controls. Add scoped JavaScript registration and tests for module initialization and key handling.

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

Or

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

@adamint

Copy link
Copy Markdown
Member Author

Captured annotated before/after evidence for this issue:

The before recording shows Enter on the focused Open in text visualizer row control opening both the text visualizer dialog and the row details pane. The after recording shows the same Enter key path opening only the text visualizer dialog while row details remain closed.

Draft fix PR: #17789

@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 the Resources grid.

Steps: focus the interactive control inside a resource row, press Enter, and count whether the parent row key handler also sees Enter. On main, the parent row saw the Enter key once. On this PR, the inner control stops the row keydown path and the parent count stays 0.

Proof:

{"pr":"17789","phase":"base","enterCount":1}
{"pr":"17789","phase":"pr","enterCount":0}

@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: focused the row child “open in text visualizer” control, pressed Enter, and counted whether the parent row handler also fired.

main / before: Parent row Enter handler count after pressing Enter on child control: 1

this PR / after: Parent row Enter handler count after pressing Enter on child control: 0

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

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

before/after accessibility proof for PR #17789

@adamint Adam Ratzman (adamint) changed the title Fix Resources grid keyboard activation [do not review] Fix Resources grid keyboard activation Jun 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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

Development

Successfully merging this pull request may close these issues.

Pressing Enter on controls triggers multiple actions (control activation + row detail expansion):A11y_Aspire Dashboard_Resources_Keyboard

1 participant