Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(ui-mode): make the filter summary reachable from the keyboard - #42449

Merged
Devin Rousso (dcrousso) merged 1 commit into
microsoft:mainfrom
HuzaifaChaudary:fix/ui-mode-filter-summary-keyboard
Aug 28, 2026
Merged

fix(ui-mode): make the filter summary reachable from the keyboard#42449
Devin Rousso (dcrousso) merged 1 commit into
microsoft:mainfrom
HuzaifaChaudary:fix/ui-mode-filter-summary-keyboard

Conversation

@HuzaifaChaudary

Copy link
Copy Markdown
Contributor

Closes #42439

problem

the filter summary under the search input in UI Mode toggles the status and project filters when you click it, but it is a div with an onClick:

<div className='filter-summary' title={...} onClick={() => setExpanded(!expanded)}>

so tab skips it, enter and space do nothing, and a screen reader announces it as ordinary text rather than a control that expands something. the chevron next to it is already a button, which makes the summary the odd one out rather than a deliberate choice.

fix

make it a real button with aria-expanded.

using a native button rather than role='button' plus tabIndex plus a keydown handler means focus, enter, space and the button role all come from the platform. it also matches Expandable right above it, which already renders its toggle as a button with aria-expanded.

the css resets the button chrome the same way .expandable-title-button does and adds the same focus ring, so it looks the way it did:

.filter-summary {
  all: unset;
  display: block;
  /* ...the previous properties... */
}

.filter-summary:focus-visible {
  outline: 1px solid var(--vscode-focusBorder);
  outline-offset: -1px;
}

one thing worth calling out: the original properties lived in a rule shared with .filter-title, so the reset is in its own .filter-summary block rather than added to the shared one. .filter-title is untouched.

test

should toggle filters from the keyboard in ui-mode-test-filters.spec.ts, close to your snippet in the issue, plus the aria state and the space key:

await expect(summary).toHaveRole('button');
await expect(summary).toHaveAttribute('aria-expanded', 'false');
await summary.focus();
await expect(summary).toBeFocused();
await summary.press('Enter');
await expect(page.getByTestId('status-filters')).toBeVisible();
await expect(summary).toHaveAttribute('aria-expanded', 'true');
await summary.press('Space');
await expect(page.getByTestId('status-filters')).toBeHidden();

on main it fails at the first assertion, toHaveRole('button').

verification

check result
new test on main, rebuilt fails
new test with the change passes
ui-mode-test-filters 12 passed
every ui-mode spec 139 passed
eslint on both changed files clean

disclaimer: this contribution was prepared with the assistance of an ai agent. i reproduced the behaviour, checked how Expandable solves the same problem before picking an approach, and ran the ui mode suites locally before opening this.

the summary was a div with an onClick, so tab skipped it, enter and space did
nothing, and a screen reader read it as ordinary text rather than a control
that expands something

it is a real button now, which brings focus, enter and space and the button
role with it, and aria-expanded reports the state. the chevron beside it was
already a button so this follows the same shape as Expandable

the css resets the button chrome the same way expandable-title-button does and
adds the same focus ring, so it looks unchanged
Copilot AI lite review requested due to automatic review settings August 28, 2026 20:45

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@HuzaifaChaudary

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@dcrousso
Devin Rousso (dcrousso) merged commit b276e33 into microsoft:main Aug 28, 2026
43 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/chromium/chromium.spec.ts:436 › should produce network events, routing, and annotations for Service Worker (advanced) `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/video.spec.ts:699 › screencast › should capture full viewport on hidpi `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/trace-viewer-scrub.spec.ts:177 › should drag scrubber to select action `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-page] › page/page-goto.spec.ts:90 › should work with Cross-Origin-Opener-Policy `@firefox-ubuntu-22.04-node20`

51253 passed, 1240 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8259 passed, 1361 skipped


Merge workflow run.

Huzaifa Iftikhar (HuzaifaChaudary) added a commit to HuzaifaChaudary/huzaifa-portfolio that referenced this pull request Aug 29, 2026
Two upstream PRs, both merged in Aug 2026:
- microsoft/playwright#42449 — UI Mode filter summary as a real button
- langchain-ai/langchain#39978 — stale duplicate block in Groq docstring

Reuses the existing .cols layout, reveal, and parallax language; new
rows are picked up by the generic [data-reveal]/[data-plx] queries.
Nav gains an Open Source link in third position so the mobile
nth-child(n+3) rule keeps hiding the same items as before.

Favicon set is cropped from the hero photo, circular-masked, with a
touch of unsharp so the face still reads at 32px:
favicon.ico (16/32/48), 16 and 32 PNGs, and a full-bleed
apple-touch-icon on the paper ground since iOS drops alpha.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01QyQQvrZTAJ7tSpEUFMrm8r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: UI Mode filter summary is mouse-only

3 participants