block / block/buzz

[Bug] Avatar/author-name focus stops twice — UserProfilePopover nests two focusable elements

Open
#2,394 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

**Describe the bug**
UserProfilePopover.tsx wraps its `children` in a trigger element that gets
`role="button"` + `tabIndex={0}` whenever `enableProfilePanel` is true
(the default). Several callers pass a real `` as `children` without
setting `enableProfilePanel={false}` — so you end up with two nested
focusable elements for what is visually one control: the wrapper
(div/span, tabIndex=0) and the inner ``. Tabbing through the UI
stops on the same avatar/name twice in a row.

**To Reproduce:**
1. Open any channel with messages.
2. Tab through the timeline with the keyboard.
3. Notice focus lands on the same message avatar (or author name) twice
before moving to the next element.

**Expected behavior:**
Each avatar/name should be a single Tab stop.

**Supporting Material**
Screenshot attached (system message avatar case).

**Environment:**
- Desktop app (Tauri)

**Additional context**
This isn't isolated — the same pattern (button child, no
`enableProfilePanel={false}`) appears in:
- desktop/src/features/messages/ui/MessageRow.tsx (avatar + author name —
every message, every channel)
- desktop/src/features/messages/ui/SystemMessageRow.tsx
- desktop/src/features/projects/ui/ProjectCards.tsx
- desktop/src/features/projects/ui/ProjectsPullRequestsList.tsx
- desktop/src/features/projects/ui/ProjectsActivityFeed.tsx
- desktop/src/features/projects/ui/ProjectProfileIdentity.tsx
- desktop/src/features/projects/ui/ProjectsIssuesList.tsx
- desktop/src/features/pulse/ui/NoteCard.tsx
- desktop/src/features/pulse/ui/AgentActivityCard.tsx
- desktop/src/features/forum/ui/ForumThreadPanel.tsx

Likely fix: pass `enableProfilePanel={false}` at each of these call sites
(the inner button already handles the click), or have
UserProfilePopover detect a ``/interactive child and skip adding
its own tabIndex/role automatically.

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.