Fullscreen table and Mermaid views don't move, keep or restore keyboard focus
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- accessibility, frontend
Línea de trabajo
Start in the fullscreen overlay for tables and Mermaid diagrams, which renders role="dialog" and aria-modal="true", and in the "View fullscreen" button that opens it. Reproduce on the playground and check document.activeElement after opening and closing. Done when focus moves to the close button on open, Tab stays inside the dialog or the page behind it is inert, and focus returns to the opening button on close.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
The fullscreen overlay for tables and Mermaid diagrams renders role="dialog" and aria-modal="true", but it never moves focus into the dialog:
- After opening, focus stays on the "View fullscreen" button, which is now hidden behind the overlay.
- Tab moves through page content behind the overlay.
- Closing the overlay drops focus to
<body>, so keyboard and screen reader users lose their place.
Steps to Reproduce
- Open https://streamdown.ai/playground (the default content includes a table and Mermaid diagrams).
- Click "View fullscreen" on the table.
- Check
document.activeElement. It is still the "View fullscreen" button behind the overlay. - Press Tab. Focus moves to a "Download file" button of a code block behind the overlay.
- Click the close (X) button.
document.activeElementis now<body>.
The same happens with "View fullscreen" on a Mermaid diagram.
Expected Behavior
Follow the WAI-ARIA modal dialog pattern:
- When the dialog opens, move focus into it (for example to the close button).
- Keep Tab inside the dialog, or make the content behind it
inert. - When it closes, return focus to the "View fullscreen" button that opened it.
Actual Behavior
Focus never enters the dialog, Tab reaches hidden content, and focus is lost on close.
Code Sample
import { Streamdown } from "streamdown";
import { mermaid } from "@streamdown/mermaid";
const markdown = `| Feature | Status |
| --- | --- |
| Tables | Supported |
\`\`\`mermaid
flowchart LR
A --> B
\`\`\``;
export function Example() {
return <Streamdown plugins={{ mermaid }}>{markdown}</Streamdown>;
}
Streamdown Version
2.7.1 (also on streamdown.ai/playground)
React Version
19.3.1
Browser(s)
Chrome (desktop)
Operating System
macOS
Additional Context
Neither fullscreen component has any focus handling: there is no focus() call, focus trap or inert in either. A fix could:
- remember
document.activeElementwhen opening; - focus the close button after the dialog mounts;
- set
inerton the rest of the page while open; - return focus to the remembered element on close.
Related: #506 added role="dialog" and aria-modal to the Mermaid overlay, but focus handling is still missing.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5.8k
- Forks
- 334
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 33
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel/streamdown
-
Table copy and download lose header cells in body rows, image cells, and tables without a header rowPosiblemente ocupada @AbbasFullstack la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
vercel/streamdown#734 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has mathPosiblemente ocupada @orinnz la tomó hace 43 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
vercel/streamdown#652 ·
Los mantenedores suelen responder en 1 día
-
Mermaid shows no error when a previously valid chart becomes invalidPosiblemente ocupada @biggdawg320 la tomó hace 5 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
vercel/streamdown#724 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
vercel/streamdown#719 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
vercel/streamdown#699 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel/streamdown
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/tether#52 ·
Los mantenedores suelen responder en 1 día
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/void#835 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AykutSarac/jsoncrack.com#616 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melgarafael/DeskcommCRM#4679 ·
Los mantenedores suelen responder en 1 día