Bash.tv → GitHub → itch.io

Build accessibility into browser games, for players with low vision, color blindness, deafness, motor and cognitive disabilities. Tested helpers for captions with speaker names and sound cues with direction, a seizure-safe flash limiter, game speed, wider timing windows, aim assist, one-switch scanning, minimum text sizes, a high-contrast palette, and a screen-reader layer that mirrors canvas m...

Download skill (.zip) Files on GitHub

Game accessibility

Start with the options that help the most players for the least work:

Priority Option Helps
1 Remappable controls, hold-or-toggle (game-control-customization) Motor, one-handed, different devices
1 Subtitles and captions, on by default Deaf and hard of hearing, noisy places, muted phones
1 Text size, contrast backing behind text Low vision, small phones
1 Screen shake, flashing and reduce-motion settings Motion sickness, photosensitivity, vestibular disorders
2 Color not the only cue, plus a color filter (game-accessibility-audit) Color blindness (1 in 12 men)
2 Game speed, timing windows, aim assist, skip puzzle or invincibility Motor, reaction time, cognitive
2 Pause anywhere, replayable tutorial, objective always visible Cognitive, interruptions
3 One-switch mode, screen-reader menus, sound cues with direction Severe motor, blind and low vision

assets/access.js

import { ACCESS_DEFAULTS, createCaptions, createFlashGuard, scaledDt, timingWindow, aimAssist, createScanner, textPx, palette, labelCanvas, createAnnouncer, mirrorMenu } from "./access.js";
const captions = createCaptions({ soundCues: settings.get("soundCues") });
captions.say("We have to go!", { speaker: "Mia" });
captions.say("Footsteps", { sound: true, direction: (enemy.x - player.x) / 300 });   // "[Footsteps, left]"
draw last: captions.draw(ctx, W, H, { size: settings.get("captionSize"), background: 0.75 });
const flash = createFlashGuard({ enabled: settings.get("flashing") });  flashAlpha = flash.allow(0.8);   // never more than 3 a second
const dt = scaledDt(rawDt, settings.get("gameSpeed"));                  // 0.25..2
const hitWindow = timingWindow(80, settings.get("timingWindow"));       // ms
aim = aimAssist(player, aim, enemies, { strength: settings.get("aimAssist") });
const C = palette(NORMAL_COLORS, settings.get("highContrast"));
ctx.font = `${textPx(18, settings.get("textScale"))}px sans-serif`;
labelCanvas(canvas, "Gem Dash: score 1200, wave 3");  const say = createAnnouncer(); say.say("Wave 3", { urgent: false });
const sr = mirrorMenu(menu);  after the menu changes: sr.sync();        // Tab and screen readers reach the canvas menu

Rules

Tested

Node tests: captions with speakers, sound cues off by default, direction labels, repeated sounds not stacking, line limit, expiry and drawing; the flash limit, softening and off switch; game speed limits; timing windows; aim assist inside and outside the cone; the scanner; text minimums; high-contrast palette. The screen-reader menu was checked in a browser with a game-menu-system menu (focus, arrow keys, activation). The device lab shows captions with sound direction and game speed.

Pitfalls

Options that don’t do anything, subtitles without speaker names, text-only fixes for color problems, flashing that ignores the setting, accessibility menus nobody can find, and asking disabled players to “just practice”.