Skip to content

fix(react-accordion): prevent keyboard focus from entering a collapsing panel#35960

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-accordion-collapse-delay
Open

fix(react-accordion): prevent keyboard focus from entering a collapsing panel#35960
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-accordion-collapse-delay

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

  • Add inert and tabIndex=-1 to AccordionPanel root when state.open is false to prevent keyboard focus from entering a collapsing panel
  • Update AccordionPanel.test.tsx with two new tests covering the open/closed state behavior
  • All 96 tests pass
  • TypeScript type-check passes
  • Add changefile for @fluentui/react-accordion (patch)

…t when closed

Prevents keyboard focus from moving into a collapsing accordion panel.
The inert attribute makes all descendants non-interactive during collapse,
while tabIndex=-1 prevents the panel container itself from receiving focus.

Fixes: accordion collapse delay allows focus to move into collapsing panel

Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/0690dcdf-78f9-484d-8cfc-12fd084c7ad4

Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix accordion collapse delay to prevent keyboard focus issues fix(react-accordion): prevent keyboard focus from entering a collapsing panel Apr 7, 2026
Copilot AI requested a review from dmytrokirpa April 7, 2026 20:20
@dmytrokirpa
Copy link
Copy Markdown
Contributor

@copilot generate a changefile by running yarn change with type patch and message
fix: prevent keyboard focus from entering a collapsing panel

Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/a144f753-aa89-4fe9-ad6f-1af22d669f3d

Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 7, 2026

@copilot generate a changefile by running yarn change with type patch and message
fix: prevent keyboard focus from entering a collapsing panel

Done — changefile added in commit 54eff725 for @fluentui/react-accordion as a patch with message fix: prevent keyboard focus from entering a collapsing panel.

@dmytrokirpa dmytrokirpa marked this pull request as ready for review April 8, 2026 06:48
@dmytrokirpa dmytrokirpa requested review from a team and ValentinaKozlova as code owners April 8, 2026 06:48
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.

[Bug]: Accordion collapse delay allows focus to move into collapsing panel

2 participants