@cardenelabs/dragon 0.46.1 → 0.46.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cardenelabs/dragon",
3
- "version": "0.46.1",
4
- "description": "Dragon — 動く図を、人は行ごとの記法で、AI は JSON で書く。時系列図と構成図を段ごとに動かし、mp4・GIF・HTML・PNG に書き出す。",
3
+ "version": "0.46.4",
4
+ "description": "Animated diagrams that people write in a plain notation and AI writes as JSON. Plays on a page and exports MP4, GIF, HTML, and PNG.",
5
5
  "license": "MIT",
6
6
  "author": "cardene777",
7
7
  "homepage": "https://github.com/cardene777/dragon",
package/src/player.ts CHANGED
@@ -287,9 +287,16 @@ export function mountDiagram(host: HTMLElement, diagram: unknown, options: Playe
287
287
  next = svg ? (svg.cloneNode(true) as SVGSVGElement) : null;
288
288
  }
289
289
  if (!next) return;
290
- next.setAttribute("aria-hidden", "true");
291
- next.removeAttribute("role");
292
- next.removeAttribute("aria-label");
290
+ // 箱の飛び先 (#3199) の link を持つ図を隠すと、Tab で押せる link が読み上げから消える。
291
+ // その図は名前を残した group として読ませ、link の無い図は段の一覧に読ませて図を隠す (#3329)
292
+ if (next.querySelector("a[href]")) {
293
+ next.removeAttribute("aria-hidden");
294
+ next.setAttribute("role", "group");
295
+ } else {
296
+ next.setAttribute("aria-hidden", "true");
297
+ next.removeAttribute("role");
298
+ next.removeAttribute("aria-label");
299
+ }
293
300
  next.style.setProperty("--at", String(at));
294
301
  next.style.setProperty("--play", playing ? "running" : "paused");
295
302
  next.dataset.motion = playing ? "play" : "still";