Skip to content

fix(accordion): skip panels that do not render in the keyboard navigation - #2418

Merged
rkaraivanov merged 2 commits into
masterfrom
rkaraivanov/accordion-navigation-fix
Oct 1, 2026
Merged

rkaraivanov merged 2 commits into
masterfrom
rkaraivanov/accordion-navigation-fix

Conversation

@rkaraivanov

Copy link
Copy Markdown
Member

Description

The arrow keys, Home and End moved the focus to a panel with the hidden attribute or display: none, where focus fails, so the focus stayed on the current panel. The navigation now skips panels that do not render.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • My code follows the project's coding standards
  • I have tested my changes locally
  • I have updated documentation if needed
  • I have added a CHANGELOG.md entry under [Unreleased]

…tion

The arrow keys, Home and End moved the focus to a panel with the hidden
attribute or display: none, where focus fails, so the focus stayed on
the current panel. The navigation now skips panels that do not render.
Copilot AI balanced review requested due to automatic review settings October 1, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Visibility must be checked on the focusable header rather than only the panel host.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Updates accordion keyboard navigation to skip non-rendered panels.

Changes:

  • Filters keyboard navigation targets by visibility.
  • Adds navigation tests and specification updates.
  • Documents the fix in the changelog.
File Description
src/​components/​accordion/​accordion.ts Filters navigable panels by visibility.
src/​components/​accordion/​accordion.spec.ts Tests hidden-panel navigation.
src/​components/​accordion/​spec.md Documents visibility behavior.
CHANGELOG.md Records the fix.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/accordion/accordion.ts
Comment thread src/components/accordion/accordion.spec.ts
Fix visibility check for navigable panels.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rkaraivanov
rkaraivanov merged commit abc94b0 into master Oct 1, 2026
7 checks passed
@rkaraivanov
rkaraivanov deleted the rkaraivanov/accordion-navigation-fix branch October 1, 2026 07:59
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