Skip to content

fix(fuselage): use :focus-visible instead of :focus for AccordionItem focus styling#1889

Open
vmridul wants to merge 3 commits intoRocketChat:mainfrom
vmridul:fix/blueborderinconsistency
Open

fix(fuselage): use :focus-visible instead of :focus for AccordionItem focus styling#1889
vmridul wants to merge 3 commits intoRocketChat:mainfrom
vmridul:fix/blueborderinconsistency

Conversation

@vmridul
Copy link
Copy Markdown

@vmridul vmridul commented Mar 5, 2026

Changes

Updates the focus styling of AccordionItem headers to use :focus-visible instead of :focus.

Issue

The accordion header applies a focus border when interacted with. In some dialogs (such as Create Channel / Create Team) the border can remain visible after interaction (see the 3rd screen recording), making the accordion appear permanently highlighted.

Result

-Prevents the focus border from appearing after mouse interaction.
-Preserves focus indication for keyboard navigation.
-Improves visual consistency across the UI.

Testing

Tested in:
-Storybook Accordion component

Screen Recordings

  1. Accordion behavior in Storybook before the change
    https://github.com/user-attachments/assets/32bb55f1-ea30-4a24-8ed7-c3c0102703bf

  2. Accordion behavior in Storybook after the change
    https://github.com/user-attachments/assets/a8b20499-155e-4dc9-9a09-8c5e0d5e91d0

  3. Accordion in Create Channel dialog demonstrating the issue
    https://github.com/user-attachments/assets/8508492e-f51b-4f76-97e4-df8681252ff5

Issue(s)

Further comments

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 7743363

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dougfabris dougfabris changed the title fix(accordion): use :focus-visible instead of :focus for AccordionItem focus styling fix(fuselage): use :focus-visible instead of :focus for AccordionItem focus styling Mar 5, 2026
@dougfabris
Copy link
Copy Markdown
Member

@vmridul Thanks for the contribution. I will run some tests, can u add a changeset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants