Skip to content

feat(storefront): the copy button says "Copied" to screen readers too - #61

Merged
StfBauer merged 1 commit into
mainfrom
feat/copy-announce
Nov 15, 2026
Merged

StfBauer merged 1 commit into
mainfrom
feat/copy-announce

Conversation

@StfBauer

@StfBauer StfBauer commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The first item of 0.5.0, from the 0.4.2 findings.

  • A storefront page's code block has no copy button in its markup. The page's script adds one only where the browser can copy, so without scripting or a clipboard there is no button, and no skin's CSS can show one that does nothing.
  • "Copied" (or "Not copied") is also said in a polite live region, since the button's name ("Copy source") doesn't change.

The workbench's own copy buttons are unchanged. Test: storefront-bench e2e/copy.spec.ts (dev and static): the live region says "Copied"; without a clipboard there is no button even with a stylesheet that forces .copy-btn visible; with JavaScript off the markup has no button. Each case failed on 0.4.2.

All gates pass locally on Node 22.22 and 24.22 (dev-ui E2E 354, storefront 179, skin 155, package-bench 7).

A storefront page's code block has no copy button in its markup any more.
The page's script adds one only where the browser can copy, so without
scripting or a clipboard there is no button a skin's CSS could show. The
outcome ("Copied", "Not copied") is also said in a polite live region,
since the button's name doesn't change.
@StfBauer
StfBauer merged commit dca789b into main Nov 15, 2026
7 checks passed
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.

1 participant