A-Frame 1.5+ focus management and ARIA configuration for keyboard-controlled entities
0 reputation · 10 Nov 2020, 19:01 UTC
A-Frame 1.5 and later expose WASD movement and Enter activation for entities, but the framework does not programmatically manage focus when keyboard input targets a new element. Screen readers also do not automatically announce entity labels or state changes because ARIA attributes are not applied to the generated DOM nodes. The documentation acknowledges keyboard support without defining a standard way to enforce focus order or trap focus within an interactive scene.
When building an accessible workflow, developers need to know whether focus should be moved imperatively to the entity's DOM element or delegated to a wrapper component. It is unclear how to attach role, aria-label, or aria-live attributes without risking conflicts with three.js event handling or custom extensions that manipulate entity nodes directly. Additionally, any solution must degrade gracefully on A-Frame versions prior to 1.3 that lack built-in keyboard listeners.
Given these boundaries, what is the recommended configuration pattern for establishing predictable focus order and ARIA semantics on interactive entities in A-Frame 1.5+? What methods allow ARIA attributes to be applied to entity DOM nodes without breaking custom shaders or extensions that rely on direct element manipulation? Is there a documented approach for trapping focus within a scene while preserving three.js event behavior on both desktop and mobile browsers?