@devries-cameron20 / t3code Mirror · read-only / commits / d2a90b921a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 23:00 UTC

fix(web): name message copy actions accurately (#12865)

Alex Southwell committed Sep 22, 2026 at 08:33 UTC d2a90b921a5843654a58448d0bc59828e1e3ccc4
3 files changed +42 -3
apps/web/src/components/chat/MessageCopyButton.tsx
+2 -2
@@ -37,7 +37,7 @@ export const MessageCopyButton = memo(function MessageCopyButton({
37 <TooltipTrigger
38 render={
39 <Button
40 - aria-label="Copy link"
40 + aria-label="Copy message"
41 disabled={isCopied}
42 onClick={() => copyToClipboard(text)}
43 ref={ref}
@@ -51,7 +51,7 @@ export const MessageCopyButton = memo(function MessageCopyButton({
51 {isCopied ? <CheckIcon className="size-3 text-primary" /> : <CopyIcon className="size-3" />}
52 </TooltipTrigger>
53 <TooltipPopup>
54 - <p>Copy to clipboard</p>
54 + <p>Copy message</p>
55 </TooltipPopup>
56 </Tooltip>
57 );
apps/web/src/components/chat/MessagesTimeline.test.tsx
+1 -1
@@ -1320,7 +1320,7 @@ describe("MessagesTimeline", () => {
1320 />,
1321 );
1322
1323 - expect(markup).toContain('aria-label="Copy link"');
1323 + expect(markup).toContain('aria-label="Copy message"');
1324 expect(markup).toContain('data-user-message-collapsed="true"');
1325 expect(markup).toContain('data-user-message-footer="true"');
1326 });
docs/internals/consistency-action-names.md new
+39
@@ -0,0 +1,39 @@
1 +# Action names agree across presentations
2 +
3 +Proposed invariant: a command's visible label, tooltip, menu wording and accessible
4 +name describe the same action on the same object. An icon-only presentation must
5 +retain that meaning. This applies to shared web/Electron controls and corresponding
6 +React Native iOS/Android actions, wherever those actions are available.
7 +
8 +Separate strings can drift while each presentation still looks plausible. A message
9 +copy action called “Copy link” promises a different clipboard payload to someone
10 +using a screen reader. Use wording that identifies the actual target, including
11 +when a message contains links or structured context. Additional clipboard formats
12 +do not turn copying a message into copying a link.
13 +
14 +This proposal draws on Apple's [Writing](https://developer.apple.com/design/human-interface-guidelines/writing)
15 +and [Accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility)
16 +guidance. It is a product constraint, not a claim of Apple certification or complete
17 +application compliance.
18 +
19 +## Boundaries
20 +
21 +Native menus and assistive technologies may use different wording or omit a tooltip.
22 +Labels need semantic agreement, not identical strings across platforms. A contextual
23 +“Copy” is sufficient when its target is unambiguous; do not globally expand it.
24 +Temporary “Copied” feedback may replace an action label without implying a different
25 +target. Clipboard transport, success timing and error reporting are separate concerns.
26 +
27 +## Observable cases
28 +
29 +- User and assistant message copy controls identify the message, in both tooltip
30 + and accessible name. Collapsing a long message does not change the action's meaning.
31 +- Copying a message with structured context still identifies the message; it does
32 + not promise to copy only a context link.
33 +- Code and plan copy actions retain their own targets. A contextual plan menu can
34 + say “Copy to clipboard”; a code control must not be announced as copying a message.
35 +- An icon, labeled button or native menu for an equivalent command conveys the same
36 + operation. Completed feedback never names a different object.
37 +
38 +Verify visible wording alongside the runtime accessible name and resulting action.
39 +Source inspection and screenshots alone do not establish accessibility-tree behavior.