Skip to content

fix(trace-viewer): label filter inputs and keyboard-accessible error source - #42469

Open
Changsu Seong (scs0209) wants to merge 2 commits into
microsoft:mainfrom
scs0209:fix/trace-viewer-a11y-42463
Open

fix(trace-viewer): label filter inputs and keyboard-accessible error source#42469
Changsu Seong (scs0209) wants to merge 2 commits into
microsoft:mainfrom
scs0209:fix/trace-viewer-a11y-42463

Conversation

@scs0209

@scs0209 Changsu Seong (scs0209) commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Add aria-label to the network tab and UI mode filter searchboxes (matching the existing Filter actions / html-reporter pattern).
  • Replace the mouse-only @ file:line span in the Errors tab with a native <button> that has an accessible name and :focus-visible ring.

Fixes #42463

Test plan

  • tests/library/trace-viewer.spec.ts — network filter exposes searchbox name; error source link opens Source tab via keyboard
  • tests/playwright-test/ui-mode-test-filters.spec.ts — UI mode filter input exposes accessible name

Notes

Thanks to Ayaan Gazali (@ayaangazali) for filing the issue and sharing context on prior a11y fixes (#41434, #42336). I claimed this after their go-ahead in #42463 (comment).

I noticed #42465 also targets this issue; this PR is scoped only to the trace-viewer a11y items in #42463 (no unrelated changes), adds regression tests, uses aria-label={Go to source: ${longLocation}} on the error source control, and adds :focus-visible styling per the trace-viewer focus pattern.

@scs0209

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

…source

Add aria-labels to the network and UI mode filter searchboxes, and replace
the mouse-only error source span with a native button that exposes an
accessible name and focus ring.

Closes microsoft#42463

Co-authored-by: Cursor <cursoragent@cursor.com>

@dgozman Dmitry Gozman (dgozman) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks pretty good. Let's drop two unnecessary tests, and we can land this.

await expect(summary).toHaveAttribute('aria-expanded', 'false');
});

test('should expose an accessible name for the filter input', async ({ runUITest }) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop this test, it does not add much.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed in f4727a6.

Comment thread tests/library/trace-viewer.spec.ts Outdated
await expect(traceViewer.errorMessages.nth(0)).toHaveText('Expect failed');
});

test('should open error source from the keyboard', async ({ page, server, runAndTrace }) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop this test, it does not add much.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed in f4727a6.

Per review feedback, remove standalone filter-name and keyboard source
tests; the network filter assertion in the existing spec is enough.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

2 failed
❌ [playwright-test] › playwright.trace.spec.ts:1355 › should not nest top level expect into unfinished api calls @ubuntu-latest-node24
❌ [playwright-test] › reporter-blob.spec.ts:186 › should merge into html with dependencies @windows-latest-node22

7 flaky ⚠️ [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://cdn.playwright.dev) `@package-installations-macos-latest`
⚠️ [chromium-library] › library/inspector/cli-codegen-2.spec.ts:202 › cli codegen › should upload a file via hidden input triggered by button `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:294 › screencast › should capture navigation `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node22`
⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`

51273 passed, 1241 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-drag.spec.ts:19 › drag between elements @mcp-windows-latest-firefox

8304 passed, 1367 skipped


Merge workflow run.

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]: two trace viewer filter inputs have no accessible name, and the error source link is mouse-only

2 participants