fix(trace-viewer): label filter inputs and keyboard-accessible error source - #42469
fix(trace-viewer): label filter inputs and keyboard-accessible error source#42469Changsu Seong (scs0209) wants to merge 2 commits into
Conversation
|
@microsoft-github-policy-service agree |
3556ad4 to
640eca2
Compare
…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>
640eca2 to
39efc67
Compare
Dmitry Gozman (dgozman)
left a comment
There was a problem hiding this comment.
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 }) => { |
There was a problem hiding this comment.
Let's drop this test, it does not add much.
There was a problem hiding this comment.
Done — removed in f4727a6.
| await expect(traceViewer.errorMessages.nth(0)).toHaveText('Expect failed'); | ||
| }); | ||
|
|
||
| test('should open error source from the keyboard', async ({ page, server, runAndTrace }) => { |
There was a problem hiding this comment.
Let's drop this test, it does not add much.
There was a problem hiding this comment.
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>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"2 failed 7 flaky51273 passed, 1241 skipped Merge workflow run. |
Test results for "MCP"1 failed 8304 passed, 1367 skipped Merge workflow run. |
Summary
aria-labelto the network tab and UI mode filter searchboxes (matching the existingFilter actions/ html-reporter pattern).@ file:linespan in the Errors tab with a native<button>that has an accessible name and:focus-visiblering.Fixes #42463
Test plan
tests/library/trace-viewer.spec.ts— network filter exposessearchboxname; error source link opens Source tab via keyboardtests/playwright-test/ui-mode-test-filters.spec.ts— UI mode filter input exposes accessible nameNotes
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-visiblestyling per the trace-viewer focus pattern.