Bug - PageSidebar - collapsed sidebar is aria-hidden but its navigation links stay in the tab order

Open Beginner friendly
#12,693 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Sophran-fbj is already working on this.

Since Nov 16, 2026.

  • #12720 by @Sophran-fbj — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript

Research direction

Start in packages/react-core/src/components/Page/PageSidebar.tsx and trace how the managed sidebar handles its collapsed state and focusable descendants. Reproduce the issue with a PageSidebar containing a Nav below the xl breakpoint, then check that collapsed navigation links cannot receive keyboard focus while the sidebar is aria-hidden.

Written by the indexing model from the issue text.

Description

Describe the problem
When the Page sidebar collapses, PageSidebar renders aria-hidden={!sidebarOpen} (current main, packages/react-core/src/components/Page/PageSidebar.tsx), but nothing removes its descendants from the focus order (no inert, no tabindex="-1", and the content stays rendered). Keyboard users can Tab into a region that assistive technology is told does not exist (axe aria-hidden-focus, WCAG 4.1.2).

Observed in Keycloak 26.8.1's Admin Console (PatternFly 5 Page / PageSidebar with a nav), below the xl breakpoint where the sidebar collapses (320 and 390 CSS px): the collapsed sidebar is aria-hidden="true" while its navigation links (#nav-item-realms, #nav-item-clients, … #nav-item-user-federation) remain in the tab order.

How do you reproduce the problem?

  1. Render a Page with a managed PageSidebar containing a Nav with links.
  2. Narrow the viewport below the xl breakpoint so the sidebar collapses.
  3. Run axe, or press Tab from the masthead and watch focus enter the hidden sidebar.

Expected behavior
A collapsed, aria-hidden sidebar is also removed from the focus order (inert on the sidebar, tabindex="-1" on its focusable descendants, or not rendering the content while collapsed).

Is this issue blocking you?
No. Workaround: none applied; the affected product is Keycloak's Admin Console.

What is your environment?
macOS, Chromium-based browser, PatternFly 5 as bundled in Keycloak 26.8.1; aria-hidden={!sidebarOpen} without inert is still present on main.

Any other information?
Found with axe while testing a themed Keycloak 26.8.1 Admin Console at narrow widths.


Jira Issue: PF-4746


Jira Issue: FELT-4741

Dominant language
TypeScript
Stars
859
Forks
395
Avg merge
3d 13h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from patternfly/patternfly-react

All issues in patternfly/patternfly-react

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.