Skip to content

Commit 2f49b3e

Browse files
committed
fix(plugin-detail): reveal the read-only field's copy button on keyboard focus
Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
1 parent df130cf commit 2f49b3e

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): reveal the read-only field's copy button on keyboard focus
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
On a record page in desktop read mode, the copy-to-clipboard button beside a read-only, copyable field was shown on hover only. It is a real button, so a keyboard user's Tab stop landed on a control they could not see. It is now also shown while it has keyboard focus, or while anything else in its field has focus (for example the field's own click-to-copy row), in the same way as the inline-edit pencil beside it. Hover, click-to-copy and the button's accessible name are unchanged.
11+
12+
What to do: nothing.

‎ui/packages/plugin-detail/src/DetailSection.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,9 @@ export const DetailSection: React.FC<DetailSectionProps> = ({
772772
<Button
773773
variant="ghost"
774774
size="icon"
775-
className="h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"
775+
// A real Tab stop, so it is revealed on keyboard focus as
776+
// well as on hover, like the pencil above (objectstack#26329).
777+
className="h-6 w-6 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 transition-opacity shrink-0"
776778
// objectui#12625 — an icon-only button; the tooltip is
777779
// closed at rest, so without this it has no name.
778780
aria-label={t('detail.copyToClipboard')}

0 commit comments

Comments
 (0)