Skip to content

fix(room-modal): center identity hero + drop close-button autofocus#969

Open
mremond wants to merge 1 commit into
mainfrom
mr/room-modal-layout-close-924a65
Open

fix(room-modal): center identity hero + drop close-button autofocus#969
mremond wants to merge 1 commit into
mainfrom
mr/room-modal-layout-close-924a65

Conversation

@mremond

@mremond mremond commented Jul 10, 2026

Copy link
Copy Markdown
Member

The Room Info modal placed a 96px avatar beside a lone, left-aligned muted JID (which broke mid-token), and the focus trap landed initial focus on the header close button — drawing the focus ring and popping its "Close" tooltip unprompted a moment after opening.

Changes

  • ModalShell: mark the X close button tabIndex={-1}. Escape already closes the modal, so the X is a pointer-only affordance. Keeping it out of the tab order (and thus out of the focus trap's initial-focus set) means opening any titled modal no longer autofocuses it — no stray focus ring, no unprompted tooltip. Focus lands on the panel container instead.
  • RoomInfoModal: rebalance the identity block into a centered hero (avatar over JID). The room name already reads as the modal title, so it isn't repeated.

Verified in demo mode: on open, focus is on the panel (not the X), the close button reports tabindex=-1, and the identity block is centered.

The Room Info modal placed a 96px avatar beside a lone muted JID, and the
focus trap landed initial focus on the header close button — drawing the
focus ring and popping its 'Close' tooltip unprompted on open.

- ModalShell: mark the X close button tabIndex={-1}. Escape closes the
  modal, so the X is a pointer-only affordance; keeping it out of the tab
  order (and the trap's initial target) means opening any titled modal no
  longer autofocuses it or pops its tooltip.
- RoomInfoModal: rebalance the identity block into a centered hero
  (avatar over JID); the room name already reads as the modal title.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant