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

Offen Anfängerfreundlich
#12,693 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Sophran-fbj arbeitet bereits daran.

Seit 16.11.2026.

  • #12720 von @Sophran-fbj — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
74/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript

Rechercherichtung

Beginne in packages/react-core/src/components/Page/PageSidebar.tsx und verfolge, wie die verwaltete Seitenleiste ihren eingeklappten Zustand und fokussierbare Nachfahren behandelt. Reproduziere das Problem mit einer PageSidebar, die unterhalb des xl-Breakpoints ein Nav enthält, und prüfe dann, dass Links in der eingeklappten Navigation keinen Tastaturfokus erhalten können, während die Seitenleiste aria-hidden ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
859
Forks
395
Ø Merge
3 T. 13 Std.
Gemergte PRs (30 T.)
15

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus patternfly/patternfly-react

Alle Issues in patternfly/patternfly-react

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.