graphics-3d: accessible DOM mirror for 3D objects

Offen
#457 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
three.js, typescript

Rechercherichtung

Start with docs/docs/lib-graphic-3d/index.mdx and inspect the graphics-3d package’s tick, ctx.graphics.worldToScreen, and __clear entry points. Check how components-systems defines ECS components before deciding where the API belongs. Done means an opt-in DOM mirror supports positioning, keyboard focus and activation, and cleanup, with tests and documentation covering those behaviors.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement modules:graphics-3d
Which package or utils is this feature request for?

graphics-3d

Feature

Three.js draws everything into a canvas. Screen readers and keyboard navigation (Tab, Enter) cannot reach the objects of a 3D scene, so a game made with @nanoforge-dev/graphics-3d is not accessible to blind or keyboard-only players (benchmark criterion E2, scored ❌ for Three.js).

Ideal solution or implementation

An opt-in way to mirror a 3D object as a hidden DOM element:

  • data: a label, an ARIA role (button, img…), and whether it is focusable;
  • each tick, the element is positioned over the object with ctx.graphics.worldToScreen, inside the game container (in container.ownerDocument, so pop-out keeps working);
  • focus and Enter/Space are forwarded to game code (a callback or an event);
  • the element is hidden visually but not from assistive tech, and removed on __clear.

If the API is an ECS component (e.g. Accessible3D(label, role, focusable)), it belongs in components-systems, and the library only provides the positioning helper.

Small, documented, and tested (positioning, focus, cleanup).

Alternative solutions or implementations

Babylon's @babylonjs/accessibility does the same thing with a DOM tree mirrored from the scene. We could port the idea instead of the code.

Other context

Deferred from the first version of graphics-3d. See docs/docs/lib-graphic-3d/index.mdx (E2).

Vorherrschende Sprache
TypeScript
Sterne
7
Forks
2
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
17

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NanoForge-dev/Engine

Alle Issues in NanoForge-dev/Engine

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.