fix: support keyboard activation for agents profile icon#318293
Open
SpencerJung wants to merge 1 commit into
Open
fix: support keyboard activation for agents profile icon#318293SpencerJung wants to merge 1 commit into
SpencerJung wants to merge 1 commit into
Conversation
Closes microsoft#317114 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Improves keyboard accessibility and ARIA state reporting for the title bar account widget that opens the combined panel/menu.
Changes:
- Add
keydownhandling so Enter/Space activates the account widget. - Expose open/closed state via
aria-expandedon the widget container.
Comment on lines
+208
to
+214
| this._register(addDisposableListener(container, EventType.KEY_DOWN, (event: KeyboardEvent) => { | ||
| if (event.key === 'Enter' || event.key === ' ') { | ||
| event.preventDefault(); | ||
| event.stopPropagation(); | ||
| this.showCombinedPanel(); | ||
| } | ||
| })); |
| @@ -205,6 +205,13 @@ class TitleBarAccountWidget extends BaseActionViewItem { | |||
| container.classList.add('sessions-account-titlebar-widget'); | |||
| container.setAttribute('role', 'button'); | |||
| @@ -267,6 +274,7 @@ class TitleBarAccountWidget extends BaseActionViewItem { | |||
| this.container.classList.add(`kind-${state.kind}`); | |||
| this.container.classList.toggle('menu-visible', this.isMenuVisible); | |||
| this.container.setAttribute('aria-label', state.ariaLabel); | |||
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #317114
Summary
Adds keyboard activation support to the Agents window title bar account/profile widget.
The widget was already focusable and exposed as a button, but pressing Enter or Space did not toggle the account/status panel. This wires those keys to the same panel toggle used by mouse activation and exposes
aria-expandedso assistive technologies can track the expanded state.How to Test
Community Rules Review
CONTRIBUTING.mdreviewed; it points code contributors to the VS Code wiki..github/pull_request_template.mdreviewed and included above..github/workflows/pr.ymltargetsmainand runs Compile & Hygiene plus Linux/macOS/Windows test workflows.main, confirmed viagh repo view microsoft/vscode --json defaultBranchRef.Verification Evidence
Dependency Setup
bun install: attempted previously in this clean clone; failed building@vscode/sqlite3because local Windows environment lacks Visual Studio C++ Build Tools.npm install --ignore-scriptssucceeded for static tooling; generatedpackage-lock.jsondiff was restored before code changes..nvmrcexpects Node22.22.1; local Node is24.14.0.Tests
TitleBarAccountWidgetkeyboard activation.bun test --bail: unavailable for this repo setup; Bun startstest/monaco/monaco.test.tsand fails resolvingchaibefore reaching this change.Type Check / Lint
npm run compile-check-ts-native: passed.npm run eslint -- src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts: passed (ESLINT_EXIT=0; warning only:ESLintPoorConcurrencyWarning).src/vs/sessions/contrib/accountMenu/browser/account.contribution.ts: no diagnostics.bun run typecheck: unavailable because VS Code rootpackage.jsonhas notypecheckscript.Build
bun run build: unavailable because VS Code rootpackage.jsonhas nobuildscript..github/workflows/pr.yml; local full build was not run because native dependency installation failed without Visual Studio C++ Build Tools.Diff Summary
Checklist
main