FIELD NOTES
Accessibility in a fast canvas game: what we built and what we missed
A real-time shooter drawn on a canvas is close to the worst case for accessibility. Here is how we approached it and where we still fall short.
PLAY FREE IN YOUR BROWSERA real-time shooter drawn on an HTML canvas is about as hard a target for accessibility as a web page gets. A canvas is a bitmap: there is no document structure for a screen reader to walk, no native buttons, no text for the browser to scale. The action is fast and mostly visual. The default controls assume two hands, a keyboard and a mouse. If you start there, every accessibility feature is something you bolt on. This article describes how Riftspinner handles accessibility, in what order we did things and why, and, because accessibility statements that list only successes are not much use, what still does not work.
Controls first: one layer for every input
The single most useful decision was structural. The game does not ask "was the W key pressed"; it asks "is the move-up action active", and a separate layer maps keys, mouse buttons and gamepad inputs to actions. That layer made a long list of features cheap, because each one became a change to a table rather than a change to the game:
- Several ways to move at once. WASD, the arrow keys and the numpad all work at the same time, including numpad diagonals (7, 9, 1 and 3), with either of the usual layouts of 8-4-5-6 or 8-4-2-6.
- Remapping. Every action has up to three key slots that can be changed, cleared or reset. A key can belong to only one action, and the game explains it if you pick a reserved key.
- Dash on three keys. Space, Shift or Numpad 0, because the right key depends on where your hand is.
- Presets. A "keyboard only" preset and a "mouse only" preset set a group of options together, so a player does not have to find six separate switches.
If we were starting again we would build this layer on day one. Retrofitting it meant touching every place the game read an input, and that was a large piece of work that a table lookup would have avoided entirely.
Playing with one hand or one device
Two-handed, keyboard-plus-mouse aiming is not a requirement of the genre, only a habit of it. Mouse-only play lets you hold the right button to move toward the cursor, or let the spider follow the cursor, with the left button firing, the middle button dashing and the wheel swapping guns. On-screen buttons cover status and pause, and the pickup prompt can be clicked. Keyboard-only play drops the mouse: with auto-aim and automatic fire on, you need only the movement keys and the dash.
Firing has its own options, because holding a button down for a whole run is a real physical cost. You can hold to fire, click to toggle firing on and off, or let the game fire automatically whenever an enemy is on the map. Those three modes are the difference between a game a person with limited hand strength can finish and one they cannot.
Gamepads work with standard controllers. The left stick or d-pad moves (the stick is analogue), the right stick aims, triggers or a bumper fire, and the face buttons dash, inspect and salvage. In menus the d-pad moves focus, one button selects and another goes back. This is where our limits begin: gamepad buttons cannot be remapped, and menu navigation by pad is basic.
Seeing the screen
A canvas game has to do its own vision accessibility, because there is no browser feature that will magnify its contents sensibly. We handle it in four ways.
High contrast. Panels become pure black with white borders and brighter text, and the spider, enemies, hostile shots and loot all get bright outlines so that they separate from a busy background. It switches on automatically if the operating system reports a preference for more contrast.
Colour-blind safety. Wherever the game compared things using red and green, for example better or worse gear, the colour-blind option changes those to blue and orange and adds up and down arrows. The aim is that meaning never depends on hue alone. The same principle drives the choice of which tier colours to use for rarity, where the label always accompanies the colour.
Interface size. Menus, the HUD and text can be set to 100%, 125% or 150%. There is a limit that is worth explaining: on small screens, such as a phone held sideways, the in-game HUD stays at 100%, because a larger one would overlap other parts of the screen. Menus still scale, and touch screens have their own zoom setting. That is a compromise, not a solution.
Crosshair. A large pointer, or a large high-contrast pointer, helps players who lose a thin default cursor against the action.
Motion, flashes and pace
Screen shake, flashes and dense particle effects are fun for some players and a real problem for others. A single switch turns off screen shake and animations, cuts particles and softens the damage flash, and it switches itself on if the operating system asks for reduced motion. That "respect the operating system first" behaviour is cheap to implement and removes a decision from the player.
The game speed option can be set to 100%, 85%, 70% or 50%. It slows everything, enemies included, so it is not an advantage in a fight: it changes reaction time, not difficulty. That matters because a speed slider that only slows the player would be a cheat, and one that slows everything is just a lower tempo. Run times on the leaderboard are naturally longer at lower speeds.
Menus, focus and screen readers
Everything outside the canvas can be built properly, and mostly we did. Menus and dialogs have the right roles and labels. When a dialog opens, keyboard focus moves into it, and when it closes, focus returns to where it was. Tab and Shift+Tab move through controls, Enter and Space press, and Escape goes back out of everything, even from inside a text box (an earlier version did not, which trapped keyboard players; see the testing article). Level-up choices can be picked with the number keys 1 to 4. The guide pages have a skip link and landmarks. The cookie popup is fully keyboard-operable and gives Accept all and Reject all equal prominence.
During play, key events are announced through a live region: wave starts and clears, monarch waves, level-up options, nearby loot and how to inspect it, weapon swaps, low health, shrines and game over. You can turn the announcements off.
Here we have to be plain about what that does and does not mean. Announcements describe key events. The moment-to-moment action is spatial and visual, so Riftspinner cannot be played with a screen reader alone. We do not claim otherwise. Treating the menus and the announcements as accessible is accurate; treating the game as accessible to a blind player would not be.
Touch, and an iPhone problem
Touch controls were the most recent addition, and they taught us how easily an accessibility fix can be incomplete. By default, the movement circle appears under the left thumb wherever it first touches, and then follows the thumb. On iPhone in particular, players found the circle could drift away from the thumb and lose control. The fix was an anchored circle: a dashed ring at a fixed spot at the bottom left, where the direction is measured from the ring rather than from the first touch, with a larger variant 30% bigger. iPhone and iPad now start with it anchored.
The honest part: we tested this in a desktop browser with simulated touch. We have not tested it on a physical iPhone. A simulator tells us the logic is right; it cannot tell us whether the ring is where a real thumb expects it. We say so on the accessibility page and ask for feedback, because that feedback is the only way the remaining problem gets found.
Known limits
- The game cannot be played by screen reader alone.
- Touch controls have been tested in desktop emulation, not on every real phone, and some menus need scrolling on a small phone.
- Gamepad buttons cannot be remapped, and gamepad menu navigation is basic.
- Menus, buttons and prompts can be switched between five languages, but item names, enemy names, achievements and the long guide pages stay in English, and canvas text such as floating damage numbers is neither translated nor announced.
- The newest screens (run setup, collection, black market, cursed cache, vault, the name popup) have not been tested with a real screen reader.
Nothing here is finished. The pattern we have found is that the features players actually ask for are rarely the ones we guessed: reporting a problem with your own keyboard layout, controller or assistive technology is more valuable than any audit. The accessibility statement lists every option and where to find it, and the contact page is how to tell us what is missing.