
Pixijs Accessibility
Add screen-reader labels and keyboard tab order to PixiJS v8 canvas sprites and containers without leaving the renderer stack.
Overview
pixijs-accessibility is an agent skill for the Build phase that enables PixiJS v8 AccessibilitySystem setup, per-container ARIA-like metadata, and keyboard tab order over canvas UI.
Install
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-accessibilityWhat is this skill?
- Configures AccessibilitySystem at Application init: enabledByDefault, debug, activateOnTab, deactivateOnMouseMove
- Sets per-container accessible, accessibleTitle, accessibleHint, tabIndex, and accessibleChildren for logical reading ord
- Uses an invisible shadow DOM overlay so assistive tech can discover and activate canvas-backed controls
- Documents default Tab-gated activation and mobile touch-hook behavior for screen-reader users
- Pairs with pointer handlers via eventMode static and pixijs-events for keyboard and tap parity
- Default activation is Tab-gated unless enabledByDefault: true is set at Application init
- Per-container properties include accessibleTitle, accessibleHint, tabIndex, and accessibleChildren for traversal order
Adoption & trust: 1.2k installs on skills.sh; 206 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You shipped PixiJS sprites and buttons on a canvas, but screen readers and keyboard-only users cannot discover or activate them like normal DOM controls.
Who is it for?
Indie builders finishing a PixiJS v8 frontend who already use static eventMode and need a documented path to screen-reader and keyboard support on canvas elements.
Skip if: Teams building non-PixiJS frontends, purely decorative canvas layers with no interactive targets, or products where native HTML components already own accessibility end-to-end.
When should I use this skill?
Adding screen reader and keyboard navigation to PixiJS v8 apps; triggers on accessibility, a11y, screen reader, ARIA, keyboard navigation, tab order, AccessibilitySystem, accessibleTitle, accessibleHint, tabIndex, or acc
What do I get? / Deliverables
After the skill runs, interactive PixiJS containers expose accessible titles, hints, tab order, and shadow-DOM activation so assistive tech and Tab navigation can reach your game or app UI.
- AccessibilitySystem enabled with documented init or post-init flags
- Labeled, keyboard-focusable interactive containers with consistent tab order
Recommended Skills
Journey fit
Accessibility wiring happens while implementing the interactive frontend layer of a PixiJS product, before ship-time compliance checks. The skill documents per-container flags, tabIndex, and AccessibilitySystem setup on the canvas stage—core frontend implementation work, not distribution or ops.
How it compares
Use for PixiJS’s built-in shadow-DOM AccessibilitySystem instead of bolting generic HTML ARIA onto a raw WebGL canvas with no container mapping.
Common Questions / FAQ
Who is pixijs-accessibility for?
Solo and indie developers using PixiJS v8 for games or rich web UIs who must make canvas-backed controls usable with screen readers and keyboard Tab order.
When should I use pixijs-accessibility?
During Build frontend work when you add buttons, menus, or tappable sprites; also when revisiting Ship review if audit findings cite missing labels, tab order, or ARIA on your PixiJS stage.
Is pixijs-accessibility safe to install?
It is procedural documentation for your codebase—review the Security Audits panel on this Prism page and inspect the skill package source before enabling it in your agent.
SKILL.md
READMESKILL.md - Pixijs Accessibility
Enable screen reader and keyboard navigation via PixiJS's AccessibilitySystem. The system creates an invisible shadow DOM overlay positioned over accessible containers so assistive technology can discover and activate them. ## Quick Start ```ts const button = new Sprite(await Assets.load("button.png")); button.accessible = true; button.accessibleTitle = "Play game"; button.accessibleHint = "Starts a new game session"; button.eventMode = "static"; button.tabIndex = 0; app.stage.addChild(button); app.renderer.accessibility.setAccessibilityEnabled(true); button.on("pointertap", () => startGame()); ``` **Related skills:** `pixijs-events` (pointer/tap handlers), `pixijs-scene-dom-container` (HTML elements on canvas), `pixijs-application` (init options). **Key points:** - By default the system activates only after the user presses Tab. Set `enabledByDefault: true` in Application init for immediate activation. - On mobile, the system creates a hidden touch hook; screen-reader focus activates accessibility for the whole session. - The AccessibilitySystem requires the main thread; it is not available in a Web Worker. ## Core Patterns ### Container accessible properties ```ts import { Container, Sprite } from "pixi.js"; const container = new Container(); container.accessible = true; container.accessibleTitle = "Navigation menu"; container.accessibleHint = "Contains links to other pages"; container.eventMode = "static"; // required for custom tabIndex to apply container.tabIndex = 0; container.accessibleType = "div"; // defaults to 'button' const sprite = new Sprite(); sprite.accessible = true; sprite.accessibleTitle = "Close dialog"; sprite.accessibleText = "X"; // text content of the shadow div sprite.eventMode = "static"; sprite.tabIndex = 1; ``` Available properties on any Container: - `accessible` (boolean) - enables the accessible overlay div - `accessibleTitle` (string) - sets the `title` attribute on the shadow div - `accessibleHint` (string) - sets the `aria-label` attribute - `accessibleText` (string) - sets inner text content of the shadow div - `accessibleType` (string) - HTML tag for the shadow element, defaults to `'button'` - `tabIndex` (number) - tab order for keyboard navigation (only applied when `interactive` is true / `eventMode` is `'static'` or `'dynamic'`) - `accessibleChildren` (boolean, default `true`) - when `false`, prevents child containers from being accessible - `accessiblePointerEvents` (string) - CSS `pointer-events` value on the shadow div ### Custom tab order Give each accessible container a `tabIndex` to control the order assistive tech walks through them. Higher numbers come later; equal numbers fall back to scene-graph order. ```ts menuButton.accessible = true; menuButton.eventMode = "static"; menuButton.tabIndex = 1; playButton.accessible = true; playButton.eventMode = "static"; playButton.tabIndex = 2; settingsButton.accessible = true; settingsButton.eventMode = "static"; settingsButton.tabIndex = 3; ``` `tabIndex` is only forwarded to the shadow div when the container is `interactive` (`eventMode` is `'static'` or `'dynamic'`). Without that, the system clamps the div's tabIndex back to `0`, and the order you set is ignored. ### Programmatic control ```ts import { Application } from "pixi.js"; const app = new Application(); await app.init({ width: 800, height: 600 }); // Enable accessibility at runtime app.renderer.accessibility.setAccessibilityEnabled(true); // Check current