fix(room-modal): center identity hero + drop close-button autofocus#969
Open
mremond wants to merge 1 commit into
Open
fix(room-modal): center identity hero + drop close-button autofocus#969mremond wants to merge 1 commit into
mremond wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.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.