Fullscreen table and Mermaid views don't move, keep or restore keyboard focus
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 5.8k
- フォーク
- 334
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel/streamdown のほかの issue
-
Table copy and download lose header cells in body rows, image cells, and tables without a header row対応中かも @AbbasFullstack が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
vercel/streamdown#734 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
remend: unclosed `$$` in a table cell is closed on a new line when an earlier line has math対応中かも @orinnz が 43 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
vercel/streamdown#652 ·
メンテナーはふだん 1 日以内に返信
-
Mermaid shows no error when a previously valid chart becomes invalid対応中かも @biggdawg320 が 5 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
vercel/streamdown#724 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
vercel/streamdown#719 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
vercel/streamdown#699 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
vercel/streamdown の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-webui/tether#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/void#835 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AykutSarac/jsoncrack.com#616 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#4679 ·
メンテナーはふだん 1 日以内に返信