Skip to content

fix(web): make image diff mode switcher keyboard accessible - #42311

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-42266
Aug 19, 2026
Merged

fix(web): make image diff mode switcher keyboard accessible#42311
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-42266

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • The image diff mode switchers (Diff / Actual / Expected / Side by side / Slider) were plain divs with no role or tabIndex — mouse-only and invisible to assistive tech. They now render as native <button role=tab aria-selected> in a tablist, following feat(web): canonical keyboard traversal and focus rings #41434.
  • Static styles move to a stylesheet with an all: unset reset; the focus ring uses var(--vscode-focusBorder, var(--color-accent-fg)) since the component is shared between the trace viewer and the html reporter theme systems.

Fixes#42266

The Diff / Actual / Expected / Side by side / Slider switchers were
plain divs with no role or tabIndex, so they could not be reached or
activated with the keyboard and were invisible to assistive tech.
Render them as native buttons with role=tab and aria-selected in a
tablist, following the approach of microsoft#41434. The focus ring falls back
from the vscode theme variable to the html reporter one, since the
component is shared between both.
Fixes: microsoft#42266
@yury-s
Yury Semikhatsky (yury-s) merged commit 28b4fea into microsoft:mainAug 19, 2026
29 of 43 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

Warning

The triggering workflow run ended with status cancelled. Results below may be incomplete — blob reports from cancelled or timed-out shards are missing, so passing/failing counts do not reflect the full test suite.

6230 passed, 1040 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

Warning

The triggering workflow run ended with status cancelled. Results below may be incomplete — blob reports from cancelled or timed-out shards are missing, so passing/failing counts do not reflect the full test suite.

7 flaky⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/global-fetch.spec.ts:293 › should return security details from response `@chromium-ubuntu-22.04-node20`
⚠️ [chromium-library] › library/har.spec.ts:639 › should have security details `@chromium-ubuntu-22.04-node20`

23591 passed, 583 skipped


Merge workflow run.

Sign up for freeto 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]: Image diff mode switcher (Diff / Actual / Expected / Side by side / Slider) is mouse-only

2 participants

@yury-s@pavelfeldman