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

Abierto Apto para principiantes
#12,693 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Sophran-fbj ya está trabajando en esto.

Desde el 16/11/2026.

  • #12720 de @Sophran-fbj — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

Empieza en packages/react-core/src/components/Page/PageSidebar.tsx y sigue cómo la barra lateral gestionada maneja su estado contraído y sus descendientes enfocables. Reproduce el problema con un PageSidebar que contenga un Nav por debajo del breakpoint xl y, después, comprueba que los enlaces de navegación contraída no puedan recibir el foco del teclado mientras la barra lateral tenga aria-hidden.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
859
Forks
395
Merge medio
3 d 13 h
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de patternfly/patternfly-react

Todos los issues de patternfly/patternfly-react

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.