From 32de2819df817b2846b880930d6da6c29ce781a9 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Mon, 24 Aug 2026 15:47:19 +0700 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20a11y=20constellation=20mirror?= =?UTF-8?q?=20=E2=80=94=20sr/keyboard-accessible=20node=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/shell/constellation-frame.tsx | 2 + .../components/shell/scene-a11y-mirror.tsx | 55 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 services/frontend/src/components/shell/scene-a11y-mirror.tsx diff --git a/services/frontend/src/components/shell/constellation-frame.tsx b/services/frontend/src/components/shell/constellation-frame.tsx index 28ef1e73..4e4f5909 100644 --- a/services/frontend/src/components/shell/constellation-frame.tsx +++ b/services/frontend/src/components/shell/constellation-frame.tsx @@ -18,6 +18,7 @@ import { resolveScene, type SceneSeed, } from "@/components/shell/route-scenes"; +import { SceneA11yMirror } from "@/components/shell/scene-a11y-mirror"; import { SceneGraphProvider, useSceneGraph, @@ -62,6 +63,7 @@ export function ConstellationFrame({
+ {/* Overlay content region — scenes place floating panels inside. */}
diff --git a/services/frontend/src/components/shell/scene-a11y-mirror.tsx b/services/frontend/src/components/shell/scene-a11y-mirror.tsx new file mode 100644 index 00000000..05391e7e --- /dev/null +++ b/services/frontend/src/components/shell/scene-a11y-mirror.tsx @@ -0,0 +1,55 @@ +"use client"; + +/** + * SceneA11yMirror — screen-reader/keyboard mirror of the live constellation. + * The canvas itself is decorative (aria-hidden); this list exposes every + * node as a real link/button so keyboard and AT users get the same graph. + */ +import { usePathname } from "next/navigation"; +import { useSceneGraph } from "@/components/shell/scene-graph-context"; + +export function SceneA11yMirror() { + const pathname = usePathname() ?? "/"; + const { state, setFocus } = useSceneGraph(); + const nodes = state?.graph.nodes ?? []; + + return ( + + ); +}