Skip to content

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

Description

@nickbrit

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 <button> 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 <button>. 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 <button>/interactive child and skip adding
its own tabIndex/role automatically.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions