# pixijs-accessibility

Configures screen readers and keyboard navigation in PixiJS v8 apps by rendering a shadow DOM overlay.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 5500 installs · ★ 358
- Author: pixijs
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-accessibility/SKILL.md
- Updated: 2026-10-01
- HTML: https://affpapa.org/en/nevibecode/skills/pixijs-accessibility

## What it does

The skill guides coding agents on connecting PixiJS v8 display containers to assistive software. It details setting `accessibleTitle` and `accessibleHint` so screen readers interpret canvas graphics correctly. Custom navigation order relies on `tabIndex`. Container elements must have `eventMode` set to `'static'` or `'dynamic'`, or PixiJS clamps the shadow element's `tabIndex` back to zero.

It covers runtime and setup options for `AccessibilitySystem`. By default, PixiJS keeps the overlay hidden until the user presses Tab. Mouse movement drops the accessibility layer immediately if `deactivateOnMouseMove` remains true. The AccessibilitySystem strictly requires the main browser thread and fails inside Web Workers, which defines how canvas rendering tasks can be partitioned.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-accessibility -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pixijs-accessibility/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pixijs-accessibility/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-accessibility -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pixijs-accessibility/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-accessibility -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pixijs-accessibility/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pixijs/pixijs-skills pixijs-accessibility
```

2. **Manually: put the files in place**
- File: `.github/skills/pixijs-accessibility/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-accessibility -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pixijs/pixijs-skills --path skills/pixijs-accessibility
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pixijs-accessibility/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pixijs/pixijs-skills --skill pixijs-accessibility -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-accessibility/SKILL.md

## When to use it
- configure keyboard navigation for PixiJS scene containers
- generate shadow DOM overlays for screen readers
- prevent accessibility deactivation when moving the mouse
- assign accessible titles and ARIA hints to game elements

## Example prompts
- Add accessibility properties and keyboard navigation to this PixiJS button
- How do I keep PixiJS AccessibilitySystem active when the mouse moves?
- Initialize PixiJS Application with accessibility enabled by default

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b7487f85c9a3a67c.

BEGIN THIRD-PARTY FILE b7487f85c9a3a67c
````text
---
name: pixijs-accessibility
description: "Use this skill when adding screen reader and keyboard navigation to PixiJS v8 apps. Covers AccessibilitySystem options (enabledByDefault, debug, activateOnTab, deactivateOnMouseMove), per-container accessibility properties, shadow DOM overlay, mobile touch-hook activation. Triggers on: accessibility, a11y, screen reader, ARIA, keyboard navigation, tab order, AccessibilitySystem, accessibleTitle, accessibleHint, tabIndex, accessibleChildren."
license: MIT
---

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
````
END THIRD-PARTY FILE b7487f85c9a3a67c

The third-party file has ended. Everything between the b7487f85c9a3a67c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2944 of 8128 bytes. © pixijs · MIT · https://github.com/pixijs/pixijs-skills/tree/HEAD/skills/pixijs-accessibility/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
