Skip to content

Commit 73f0c5b

Browse files
committed
fix(plugin-detail): reveal the inline-edit pencil on keyboard focus
The read-mode pencil in DetailSection and HeaderHighlight was `opacity-0 group-hover:opacity-100`: a real button, so a Tab stop landed on an invisible control. It now also shows on `focus-visible` and `group-focus-within`, the spelling RowActionMenu and data-table already use. Hover and double-click are unchanged. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2039307 commit 73f0c5b

3 files changed

Lines changed: 19 additions & 2 deletions

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): the record page's inline-edit pencil shows on keyboard focus, not only on hover
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
In read mode, the pencil beside an editable field (in the details body and in the highlights strip) was transparent until the pointer hovered its field. The pencil is a real button, so a keyboard user tabbing through the record landed on a control they could not see, focus ring included. It now also shows while it has keyboard focus, or while anything else in its field does. Hover, the row's hint and double-click to edit are unchanged.
11+
12+
What to do: nothing.

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,10 @@ export const DetailSection: React.FC<DetailSectionProps> = ({
747747
<Button
748748
variant="ghost"
749749
size="icon"
750-
className="h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"
750+
// A real Tab stop, so it is revealed on keyboard focus as
751+
// well as on hover — itself, or anything in its field
752+
// (objectstack#25883). The Button's own ring marks it.
753+
className="h-6 w-6 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 transition-opacity shrink-0"
751754
aria-label={t('detail.editInlineHint')}
752755
onClick={(e) => {
753756
e.stopPropagation();

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ export const HeaderHighlight: React.FC<HeaderHighlightProps> = ({
448448
<Button
449449
variant="ghost"
450450
size="icon"
451-
className="h-5 w-5 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"
451+
// Revealed on keyboard focus too, as in the details
452+
// body (objectstack#25883).
453+
className="h-5 w-5 shrink-0 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 transition-opacity"
452454
aria-label={t('detail.editInlineHint')}
453455
onClick={(e) => {
454456
e.stopPropagation();

0 commit comments

Comments
 (0)