A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Accessibility audit, 14 October 2026
Issue #41. An audit: the findings are as of 14 October 2026, and the later sections record the fixes made after it. Each finding says what fails, where, how it was found, the WCAG 2.1 criterion it is measured against, and a proposed fix. Some fixes went in later, small PRs, and others still go in.
How it was tested
- Build: a WebGL build of the PR #461 branch made on 14 October before its final rebase, served locally and driven
in a headed Chrome for Testing over the DevTools protocol, the way
tools/headed.pydoes. Its UI is that ofmainat 04bf7cb: the only later changes underunity/are one line ofWhyPresenter(a group heading) and the tilt-shift shader. A build of 04bf7cb itself was queued behind the machine lock for the whole audit. Keys were sent as real key events (Input.dispatchKeyEvent); no mouse was used after the page loaded.?navloglogged which element received each Enter. - Window: a 1568x752 CSS-pixel viewport (the playtest window) at device pixel ratio 1, unless a finding says
otherwise. At that size the UI is drawn at 0.754 of its stylesheet size (PanelSettings: 1920x1080 reference, match 0.5),
so a
font-size: 20pxlabel is about 15 CSS px on screen. WCAG's "large text" sizes are CSS px, so a stylesheet size has to be scaled before it is compared with them. - Play-through: start screen, New Game, the top bar, Cabinet (select a seat, appoint a minister), Budget (move a line, submit), Defence (call-up and level), Why, two decision cards (choose an option; Hide, "Decision waiting", Escape), and six End Turns, all by keyboard.
- Contrast: computed from the colours in
unity/Assets/UI/Statecraft.uss, with translucent colours composited in linear light as Unity does, and measured from screenshots where a photograph, the painting or the map sits behind the text. The measurement takes the most common colour in a box as the background and the median of the 3% of pixels furthest from it as the text, so anti-aliasing pulls measured ratios slightly below computed ones. - Colour vision: colour pairs run through the Machado, Oliveira and Fernandes (2009) deuteranopia and protanopia
matrices that
tools/art_compare.pyuses, then compared by contrast ratio and CIELAB distance (ΔE). - Evidence: the screenshots are in
.superpowers/a11y-2026-10-14/(local, not committed), named as below, with the driver and the scripts beside them.
Not covered: screen readers (see H5), touch, gamepad, and Hebrew UI strings (only the start screen's Hebrew is on screen today).
Summary
A full turn can be played without a mouse: answer an event, change a budget line, appoint a minister, end the turn. It is slow and in places blind, and the map cannot be used at all.
| Rank | Finding | WCAG |
|---|---|---|
| Blocker | B1. The map's hexes, the map actions (camp, housing, defence) and the minimap need a mouse; zoom needs a wheel | 2.1.1 |
| High | H1. Tab moves focus to cards and candidates scrolled out of view; the list does not follow | 2.4.7, 2.4.11 |
| High | H2. Each Budget + or - press destroys the focused button; the next Tab starts again at Cabinet | 2.4.3, 2.1.1 |
| High | H3. Why, the event text and the Defence body cannot be scrolled from the keyboard | 2.1.1 |
| High | H4. Text cannot be enlarged: browser zoom has no effect and there is no text-size setting | 1.4.4 |
| High | H5. Nothing is exposed to assistive technology; refusals and results are visual only | 4.1.2, 4.1.3 |
| Medium | M1. Focus is dropped after the start screen, after choosing an option, and after Escape from a screen | 2.4.3 |
| Medium | M2. In the Cabinet the candidate list comes before the cards in Tab order, 50 names long | 2.4.3 |
| Medium | M3. Gold text on the focus fill is 3.6 to 3.7:1 (End Turn, Decision waiting, Illustration); ink on it is 4.2 to 4.6:1 | 1.4.3 |
| Medium | M4. The current escalation rung's turn text is 2.7:1 | 1.4.3 |
| Medium | M5. Coalition or opposition is shown by swatch colour only in the party chips | 1.4.1 |
| Medium | M6. A selected Cabinet seat differs from the others by 1.2:1 fill and 2.4:1 rim | 1.4.11 |
| Medium | M7. The Cabinet's "Ordered:" line and its candidate list are cut off at 1568x752 | 1.4.10 |
| Low | L1. Up and down changes are green and red that deuteranopia cannot tell apart (the sign carries it) | 1.4.1 (passes) |
| Low | L2. Escape withdraws New Game on the start screen but not in the top bar | consistency |
| Low | L3. The event card's own focus ring is a 1 px rim at 3.0:1 against its resting rim | 2.4.11 |
| Low | L4. Arrow keys never move focus, so every list is Tab-only | 2.1.1 (passes) |
| Low | L5. Start screen secondary lines fall to about 4.0:1 where the painting is brightest | 1.4.3 |
Blocker
B1. The map is mouse-only
- What: a hex can only be chosen by clicking it (
MapPointerbinds<Mouse>/leftButton,unity/Assets/Scripts/Map/MapPointer.cs:25;GameRoot.cs:213-214wiresHexClickedto the info panel). Until a hex is chosen the info panel shows only the hint "Click the map to inspect a hex" (strings.en.yaml:98), so its Build camp, Build housing and Defence buttons (Game.uxml:104-106) are never in the Tab order. The minimap jumps the camera only on a pointer press (MinimapPresenter.cs:34). Zoom is bound to the mouse wheel only (InputSystem_Actions.inputactions:1083). Pan (WASD, arrows) and orbit (Q, E) do work from the keyboard. - How found: Tab through the HUD at every stage of the play-through never reaches the info panel
(
short-window/03-hud-tab-order-strip.png); pan and orbit checked with D and E (30a-before-keys.png,30b-after-d-and-e.png). - Proposed fix: a keyboard cursor on the map: a key (for example Enter on the map, or a "Select hex" control) that
picks the hex at the screen centre, so pan plus that key reaches any hex; the info panel's buttons then take Tab like
the rest. Bind zoom to keys too (
+/-or PageUp/PageDown), and give the minimap a focusable control or drop it from the keyboard path, since pan covers it. - Status: B1 is done, after this audit. B1a, the zoom keys, is #890. B1b, the map stop (
map-focus, after End Turn in the Tab order), is #1134: Enter or Space on it picks the hex under the camera's look-at point, as a click there would. The info panel's buttons then take Tab like the rest, with no code of their own (B1c). The minimap's three buttons take Tab since #584, and its picture still takes no focus (B1d), as the proposed fix allows since pan covers it. The whole keyboard turn, a unit order included, is pinned in #2279 (KeyboardTurnTests; the keyboard-only turn below).
High
H1. Focus goes out of sight inside scroll views
- What: the Cabinet's person cards and its candidate list are
ScrollViews (Game.uxml:160,183). Tab moves the focus onto cards and candidates below the visible area and the view does not scroll, so the focused element cannot be seen. At 1568x752 the first row holds five cards; the next Tab goes to the first card of the second row, out of view, and so on through the rest. After a seat is selected, Shift+Tab lands on the last of 50 candidates, also out of view, and Tab from the first candidate reaches the third one out of view. - How found:
05a-cabinet-last-visible-card-focus.png(the fifth card lit),05-cabinet-focus-offscreen.png(one Tab later: nothing lit),07-cabinet-candidate-offscreen.png,11a-candidate-third-offscreen.png. In a 609 px tall window the candidate list had no visible height at all, so every candidate took focus unseen (short-window/s05.png). - Proposed fix: one
FocusInEventcallback on eachScrollView(or one at the root that finds the nearestScrollViewancestor) callingScrollTo(target). An EditMode test: focus the last card, assert it lies inside the viewport.
H2. The Budget screen drops focus on every step
- What:
BudgetPresenter.ChangecallsRender(BudgetPresenter.cs:87), which clears and rebuilds every row (BudgetPresenter.cs:107). The + or - button that had focus is destroyed, nothing has focus, and the next Tab starts again at the Cabinet button. Moving one line by 15 points takes three rounds of about nine Tabs each. - How found:
13-budget-plus-focus.png(Immigration + lit),14-budget-after-plus.png(the share moved 15% to 20%, nothing lit),14a-budget-second-enter-nothing.png(a second Enter did nothing;?navlogshows no submit),15-budget-tab-restarts.png(Cabinet lit). - Proposed fix: build the rows once and update their labels in place, as
CabinetPresenteralready does for its cards ("updates its cards in place, so keyboard focus survives",CabinetPresenter.cs:20). A test asAHiddenScreenDoesNoWorkAndAnOpenOneKeepsFocus(PromoScreensTests.cs:521): focus a + button, submit it, assert it still has focus.
H3. Text-only panels cannot be scrolled from the keyboard
- What: the Why screen (
why-rows), the event text (event-scroll, which scrolls on short windows) and the Defence body (defence-body) hold labels only, so nothing in them takes focus and Tab cannot scroll them. The arrow keys pan the camera andNavigationGuard(NavigationGuard.cs:15-20) drops directional navigation by design; PageDown does nothing. After a turn with several causes the Why list runs past the bottom of the screen. - How found:
25-why-overflow.png(scroll bar shown, list cut off),26-why-keys-no-scroll.png(after PageDown and ArrowDown: unchanged, the map panned instead). - Proposed fix: while a screen is open, PageUp, PageDown, Home and End scroll its
ScrollView(handled inScreenNav, which knows which screen is open), and the same keys scroll the open card's text. Leave the arrows to the camera, as ruled in B6.
H4. Text cannot be made larger
- What: the UI scales with the canvas's pixel size (
StatecraftPanel.asset: scale mode 2, reference 1920x1080, match 0.5). Browser zoom changes the CSS size and the device pixel ratio together, so the canvas keeps the same pixel size and the UI does not grow. There is no in-game text or UI size setting. The smallest text is 13 px in the stylesheet (photo credit,Statecraft.uss:224; "members" under the house,:380), 14 px (screen button captions:114, security level:105, card stat names:348, party chips:387) and 15 px; at 1568x752 those are 9.8, 10.6 and 11.3 CSS px. - How found: the HUD at a 784x376 viewport with device pixel ratio 2 (what 200% browser zoom gives) is pixel for
pixel the HUD at 1568x752 and ratio 1: the two top bars differ by 0.0 in mean pixel value (
31b-zoom-200.png,31a-zoom-100.png). - Proposed fix: a UI size setting (100%, 125%, 150%) that multiplies
PanelSettings.scaleand is saved with the other preferences; the layout tiers inHudPresenteralready react to the bar's width. Separately, raise the floor to 15 px in the stylesheet so the smallest text is at least 11 CSS px at the playtest size.
H5. No assistive-technology output
- What: the game is a WebGL canvas. UI Toolkit on WebGL exposes no accessibility tree, so a screen reader hears
nothing: not the focused button, not the event text, not the toast that says why an order was refused ("Not done: Not
enough attention",
14-budget-refused-toast.png), not the result of End Turn. - How found: structural; no screen reader was run.
- Proposed fix: a first step that fits the engine: a hidden DOM region beside the canvas, filled through a
.jslibwith the focused element's text on every focus change and with each toast asaria-live="polite". That gives a screen-reader user the focus name and the refusals; the event text could follow when the card opens. A design call for the owner, as it is a new web-only path.
Medium
M1. Focus is dropped in three places
- What:
- After the start screen closes,
StartScreenPresenter.Closeblurs the focused button (StartScreenPresenter.cs:104-105) and, with no event open, nothing takes focus (02-map-no-focus.png). - After an event option is chosen, the card hides (
EventCardPresenter.cs:161-162) and the option that had focus goes with it (23-after-choice-no-focus.png). - After Escape closes a screen whose content had focus,
ScreenNav.Open(null)(ScreenNav.cs:113) hides the screen and the focus goes with it (08-after-escape-no-focus.png). In each case the next Tab starts again at Cabinet (09-tab-restarts-at-cabinet.png,24-tab-restarts.png), so a keyboard player needs six Tabs to get back to End Turn.
- After the start screen closes,
- Proposed fix: closing a screen gives focus back to its top-bar button; choosing an option gives it to the next open card, or to End Turn when none is left; closing the start screen gives it to End Turn (or the card, which already takes it). Pin each with an EditMode test; the issue also asks for one pinning End Turn's place in the order.
M2. The candidate list is before the cards, and long
- What: in
Game.uxmlthe side column (the Prime Minister's card, his other offices, the candidate list) comes before the main column (the cards) (Game.uxml:153-164). Selecting a seat with Enter leaves focus on the card; the candidates for it are behind, reached only by Shift+Tab from the far end of a list of every person inpeople.yaml(50), or by Tab from the start of the screen past the Prime Minister's card. - How found:
06-cabinet-seat-selected.png,10-candidate-first.png. - Proposed fix: on selecting a seat with the keyboard, move focus to the first candidate that can be appointed (refused ones are disabled and skipped by Tab already); Escape in the list returns to the seat.
M3. Text on the keyboard focus fill is below 4.5:1
- What: the focus fill
--focus(Statecraft.uss:16,63) was chosen for 3:1 against the resting fill, and it does that (3.31:1). Text on it is weaker:- gold-light text (End Turn
:159, Decision waiting:178, the Illustration switch:220-221): 3.73:1 computed; measured 3.57:1 on Decision waiting and 3.73:1 on Illustration and End Turn. End Turn is 22 px SemiBold, which is "large" only at 1080p and up; at 1568x752 it is 16.6 CSS px and needs 4.5:1. Decision waiting (20 px) and Illustration (17 px) are normal text at any size. - ink text (every other button, the event options): 4.60:1 computed, 4.21:1 measured on an option.
- gold-light text (End Turn
- How found:
16-endturn-focus.png,20-decision-waiting-focus.png,19b-illustration-focus.png,18-option-focus.png; ratios from the contrast script. - Proposed fix: keep
--focus(it is what gives the 3:1 fill change; a darker fill such as rgb(104, 85, 50) would give ink 5.66:1 but drop the fill change to 2.69:1) and use a lighter label on it instead: rgb(250, 246, 236) on--focusis 5.39:1, for every focused button including the gold ones. ExtendPromoHudTests.FocusChangesEachControlByAtLeastThreeToOneto assert 4.5:1 for the label too.
M4. The current escalation rung's turn text
- What: on the lit rung (
.rung-current,Statecraft.uss:414) the muted turn label ("turns of a week",:413, 15 px) is 3.28:1 computed and 2.68:1 measured. The rung's name passes (4.73:1 measured). - How found:
27-defence.png, rung 5. - Proposed fix:
.rung-current .rung-turn { color: var(--ink); }.
M5. Coalition membership by colour only in the party chips
- What: each chip under the house (
CabinetPresenter.Chip,CabinetPresenter.cs:241-252) is a swatch and "Mapai 10"; whether a party is in the coalition is only the swatch's blue or grey (1.72:1 against each other,Statecraft.uss:388). The hemicycle is backed by the "Coalition: 30 of 37 seats" and "Opposition: 7 seats" lines, but which party is which is not. - How found:
04-cabinet-pm-focus.png; colour pairs below. - Proposed fix: two labelled groups of chips, "Coalition" and "Opposition", or a word after each name.
M6. A selected Cabinet seat is hard to tell from the rest
- What:
.seat-selected(Statecraft.uss:350) raises the fill from--navy-deepto--navy-raised(1.17:1) and the rim from 60% gold to gold-light (2.43:1). The "Appoint to Minister of Finance" heading says which seat is selected, but the card itself does not stand out by 3:1, and once focus moves on it is the only mark. - How found:
06-cabinet-seat-selected.png, then10-candidate-first.png. - Proposed fix: a second, non-colour mark on the selected card: a thicker rim (2 px) or a small "Selected" tag on the plate.
M7. Cabinet text cut off at the playtest size
- What: at 1568x752 the side column's "Ordered: Aharon Zisling to Minister of Fi…" line is clipped at the column's
edge (
cabinet-status,Game.uxml:162, nowhite-space: normal), and the candidate list shows about one and a half rows. - How found:
12-appointed-status-clipped.png. - Proposed fix: let
#cabinet-statuswrap, and give the candidate list a minimum height (or let the side column scroll as a whole).
Low
L1. Up and down changes under colour-vision deficiency
The top bar's changes use --up and --down (Statecraft.uss:14-15,44-45, set in HudPresenter.cs:140-141). Under
deuteranopia the pair is ΔE 8 apart, which is close to indistinguishable. This is not a 1.4.1 failure, because every
change carries its sign in the text ("+IL 5.0m", "-1.7%"; HudTests.ChangesShowSignsAndZeroDeltasAreEmpty). Each colour
is above 4.5:1 on the bar (8.66 and 6.02). Proposed fix, if wanted: a small up or down mark next to the number.
Decided, 4 November 2026 (Q27): the coordinator asked: "Which accessibility package should apply to top-bar changes and arrow-key navigation?" The owner answered: "do the recommended for all". The chosen option read: "Add painted up/down triangles and let Up/Down move between rows only while a screen is open" (recorded on #2340).
L2. Escape and the top bar's New Game
On the start screen Escape withdraws an armed New Game (StartScreenPresenter.Escape). In the top bar it does not: the
toast "Press New Game again to abandon this game and start over" stays after Escape (28-newgame-escape.png). Proposed
fix: GameRoot's Escape poll (GameRoot.cs:366) also calls NewGamePresenter.Cancel when it is armed.
L3. The event card's focus ring
When a new event opens, focus goes to the card itself and its 1 px rim turns gold-light (Statecraft.uss:187), 3.01:1
against the resting rim: at the threshold, and thin on a 1040 px card (17-event-card-focus.png). Proposed fix: 2 px
when focused.
L4. Arrow keys never move focus
By design (B6, NavigationGuard.cs) the arrows pan the camera and only Tab moves focus. That meets 2.1.1, but a list such
as the Budget's 16 buttons or 50 candidates is Tab-only. Proposed fix: while a screen is open and the pointer is not
panning, Up and Down move between rows. A design call; it touches the B6 ruling.
Decided, 4 November 2026 (Q27): the coordinator asked: "Which accessibility package should apply to top-bar changes and arrow-key navigation?" The owner answered: "do the recommended for all". The chosen option read: "Add painted up/down triangles and let Up/Down move between rows only while a screen is open" (recorded on #2340).
L5. Start screen secondary lines over the painting
The English lines and the source line (--ink-dim on the 88% panel, Statecraft.uss:504,519-520) measure about 7.3:1
over the dark audience and fall to about 4.0 to 4.4:1 just above the source line where the hats are lit
(01-start-focus.png). Proposed fix: panel alpha 0.94, or --ink for the source line.
Contrast table
Computed from Statecraft.uss. "Needs" is 4.5:1 for normal text and 3:1 for large text at the 1920x1080 reference size;
at the playtest size only text of 32 px (24 CSS px) or 25 px bold (18.66 CSS px) counts as large.
| Pair | Ratio | Needs | Result |
|---|---|---|---|
Body text (ink) on the top bar and toast (--navy-solid) |
14.29:1 | 4.5:1 | pass |
| Body text on a screen (rgb 11, 18, 32) | 14.80:1 | 4.5:1 | pass |
Body text on a panel over the brightest map (--navy, 97%) |
9.52:1 | 4.5:1 | pass |
Button text on --navy-deep |
15.23:1 | 4.5:1 | pass |
Hovered button text on --navy-raised |
13.01:1 | 4.5:1 | pass |
Focused button text (ink on --focus) |
4.60:1 | 4.5:1 | pass, thin (measured 4.21:1) |
Focused gold text (gold-light on --focus) |
3.73:1 | 4.5:1 | fail (M3) |
Disabled button (ink-dim on --navy-deep) |
7.77:1 | exempt | pass |
| Muted text on the top bar | 7.28:1 | 4.5:1 | pass |
Turn and date on the date badge (--navy-raised) |
6.63:1 | 4.5:1 | pass |
| Screen button captions (14 px) | 7.28:1 | 4.5:1 | pass |
| Open screen caption (gold-light) | 11.59:1 | 4.5:1 | pass |
| End Turn, resting | 12.36:1 | 4.5:1 | pass |
| Change up / change down on the top bar | 8.66 / 6.02:1 | 4.5:1 | pass |
DRAFT (--down) on the card |
6.08:1 | 4.5:1 | pass |
| Screen title (gold-light) on a screen | 12.00:1 | 3:1 | pass |
| Section titles and Why groups (gold) | 7.61:1 | 4.5:1 | pass |
| Card office, party, stat names on a card | 7.77 to 7.83:1 | 4.5:1 | pass |
| Party chip and "members" labels on the house box | 7.78:1 | 4.5:1 | pass |
| Rung name / rung turn on a plain rung | 9.85 / 5.02:1 | 4.5:1 | pass |
| Rung turn on the current rung | 3.28:1 (measured 2.68) | 4.5:1 | fail (M4) |
| Hebrew (ink, Frank Ruhl Libre 34 px) on the start panel | 15.35:1 | 3:1 | pass |
| Photo credit on its strip (measured) | 7.11:1 | 4.5:1 | pass |
| Map labels on their pills (measured, over sea and land) | 9.66 to 9.71:1 | 4.5:1 | pass |
| Locality labels (72% pill) over the brightest ground | 2.33:1 | 4.5:1 | computed only; not seen at the tested zoom |
Non-text contrast (1.4.11, and the focus indicator):
| Pair | Ratio | Result |
|---|---|---|
| Focus fill against the resting fill | 3.31:1 | pass |
| Focus rim (gold-light) against the resting rim | 3.02:1 | pass, at the line |
| Button rim against its fill | 4.09:1 | pass |
| Open screen button rim against a closed one | 3.02:1 | pass, at the line |
| Selected seat fill / rim against an unselected seat | 1.17 / 2.43:1 | fail (M6) |
| Current rung edge against a plain rung | 7.99:1 | pass |
| Ordered rung edge (ink) against a plain rung | 9.85:1 | pass |
Colour pairs under colour-vision deficiency (ratio / ΔE):
| Pair | Normal | Deuteranopia | Protanopia |
|---|---|---|---|
| Change up against change down | 1.44:1 / 76 | 1.27:1 / 8 | 1.79:1 / 25 |
| Coalition blue against opposition grey | 1.72:1 / 47 | 1.82:1 / 50 | 1.57:1 / 45 |
| Competence bar against loyalty bar | 1.18:1 / 54 | 1.20:1 / 48 | 1.14:1 / 50 |
The bars are always labelled ("Competence", "Loyalty"), so their colours carry no meaning of their own.
Focus order per screen (as tested)
- Start screen (no save): New Game only, focused on open; Tab stays on it. Enter starts the game.
- Top bar: Cabinet, Budget, Defence, Why?, New Game, End Turn, then round again (the info panel's buttons show once
a hex is chosen, by a click or, since B1b, with Enter on the map stop after End Turn; they then take Tab).
- Since HUD round 2 (#584, after this audit): End Turn is followed by the minimap's three buttons (whole map, settlement names, region borders), then round again; the minimap's picture still takes no focus (B1d). Under the open decision card the minimap column is disabled with the info panel, so its buttons leave the order then.
- Cabinet: the top bar first, then the Prime Minister's card, his other office ("Minister of Defense"), the candidate list when a seat is selected, then the cards row by row (H1, M2).
- Budget: the top bar, then each line's - and +, then Reset and Submit (Submit is disabled until the draft changes).
- Defence: the top bar, then Lower the level, Raise the level (disabled at level 5), -5%, +5%.
- Why: the top bar only; the list takes no focus (H3).
- Decision card: the card itself on open, then each option, Hide, the Illustration switch when the event has a clip, then the top bar. Hide puts focus on Decision waiting; Enter there reopens the card with focus on it; Escape is Hide.
Escape closes the open screen; on the open card it is Hide; on the start screen it withdraws New Game.
What already works
- Every button shows keyboard focus with a fill and rim change of at least 3:1, and a mouse click leaves no focus fill
behind (
PointerBlur;PromoHudTests.FocusAndOpenAreDistinctAndAPointerClickClearsFocus,FocusChangesEachControlByAtLeastThreeToOne,PromoScreensTests.ACardsFocusIsVisibleAndAClickLeavesItUnlit). - Hidden panels are disabled as well as hidden, so Tab never reaches a control under the start screen, a screen or the
card (#400;
ScreenNav.DisableCovered,StartScreenTests.WhileItShowsTheHudIsHiddenAndOnlyItsButtonsTakeFocus,UiLayoutTests.TheTwoRowHudKeepsWhatAScreenCoversOutOfReach). - A new event puts focus on the card, not on an option, and takes it back when a covering screen closes (#441;
DecisionCardTests). In play this also stopped a second Enter meant for End Turn from ending the turn: it reached the new card instead (?navlog:ui submit target=event-card). - Hide, Decision waiting and Escape on the card all work from the keyboard, and Hide by keyboard moves focus to
Decision waiting (
20-decision-waiting-focus.png,21-reopened.png,22-escape-hides.png). - End Turn keeps focus across turns with no event, so repeated Enter plays turns.
- The camera keys never move focus or press a button (
NavigationGuard;PromoHudTests.CameraKeysNeverMoveFocusOrPressAButton), and they pan and orbit while focus is in the UI. - New Game needs two presses, so one stray Enter does not end the game.
- Body text is 9.5:1 to 15:1 throughout; muted text is 5:1 or more on every plain background; the Hebrew on the start
screen is set in a Hebrew face at 15:1; bars and seat colours meet 3:1 (
PromoScreensTests.BarsAndPartyColoursMeetThreeToOne). - Every change in the top bar carries its sign in the text, not only its colour.
The keyboard-only turn, 22 October 2026, updated to the current test
The done-when's turn, played again on main 5d5bee4d after B1a (#890), B1b (#1134) and the city panel (#381, #1122,
#1124). Unit orders were left out until #754 closed (owner, 22 October 2026); #754 closed on 22 October and the Civ
movement slices (#1527) are on main, so the turn gives one now (2 November 2026, below).
- How tested:
KeyboardTurnTests(EditMode) on Map.unity at 1280x720, a new GDD game with no start screen. Keys are sent as the UI Toolkit events the Input System's UI provider makes of them (Tab and Shift+Tab:NavigationMoveEvent; Enter:KeyDownEventthenNavigationSubmitEvent; Escape:NavigationCancelEvent), asMapFocusTestsdoes. No pointer event is sent after the game starts. - The turn: Tab once from the card to its first option, Enter (focus to the turn's second card, Degania), Tab once to its first option, Enter (focus to End Turn). Tab to Budget, Enter (the focus goes to the screen's first control, K5 below, so the 16 Tabs of the first run are gone), Tab to a line's +, Enter (focus stays, H2), Tab to Submit, Enter. Tab to Cabinet, Enter, Tab to a minister's seat, Enter (the focus goes to the first candidate that can be appointed, #2340 M2), Enter. Tab to the Cabinet button (the Tab after the last seat leaves the screen for it), Escape (the screen closes and the focus is on the Cabinet button, M1). Tab to the map stop, pan to Tel Aviv, Enter (the city panel shows), Tab to Train halutzim, Enter. Tab to the map stop, pan to Golani, Enter (Golani is selected and its Move pick opens, as in Civ), pan to a lit hex, Enter (Golani moves there; the focus stays on the map stop). Tab to End Turn (a unit still waiting for an order is given Skip first), Enter: the turn ends and the turn report takes the focus; Enter on its Close hands it to the next card, or to End Turn when none opens.
- Attention: the opening turn has 4 Attention; answering each card and Train halutzim cost 2 each, a budget and an appointment 4 each, so the steps take more than one turn's Attention. That is the game's rule, not the keyboard's: the test raises the Attention to check the path. With 4, the budget and the appointment are refused with the toast ("Not enough attention (need 4.0, have 2.0)"), as for a mouse player.
What failed, and what changed:
| Finding | Fix | |
|---|---|---|
| K1 | Tab after the Cabinet's last card (and after the last candidate) lands on the list's own scroll bar. FocusScroll then called ScrollView.ScrollTo on it, which throws for anything outside the list's content: an error on every such Tab. |
FocusScroll leaves an element outside the view's content alone (the scroll bar is always in sight). |
| K2 | Enter on a city panel button (Train, Assign, Build) rebuilt the panel and took the focus with it; the next Tab started again at Cabinet, as H2 did on the Budget. | InfoPanelPresenter gives the focus to the rebuilt button of the same name after a keyboard press; a mouse press still leaves none (PointerBlur's rule). |
Still open, not blocking the turn: nothing. The last entry, the long Tab run from a screen's button to its first control, is closed below (23 October 2026, K5).
Pinned in EditMode: the card's order (the card, each option, Hide, the side menu, New Game, End Turn, Star, Report,
Share, the card again; Shift+Tab the reverse), End Turn's (the map stop, the minimap's three buttons, Star, Report,
Share, the side menu, New Game, End Turn; Shift+Tab to New Game) and where the focus goes after End Turn
(KeyboardTurnTests). No UI string was added, so nothing goes to #564.
The unit order (2 November 2026, on main 5a2b50ae7): AWholeTurnPlaysWithTheKeyboardAlone now selects Golani
through the map stop and moves it to a lit hex, both with Enter, and checks that the sim's Move is committed. Nothing
blocked it, so no code changed. Attack and the confirm step onto a city or a friendly unit (#1808) are pinned in
KeyboardOrdersTests.
The two scroll-bar and focus-drop fixes, 23 October 2026
Two of the three items the 22 October list left open are closed here (the owner's list of 23 October 2026,
items 1 and 2); the third, the long Tab run from a screen's button to its first control, is still open above.
Both were found again on main eddd66e6 before the change, and each has an EditMode test that fails without
it.
| Finding | Fix | |
|---|---|---|
| K3 | The Cabinet's scroll bars each take a Tab stop. Walking the screen's order shows unity-slider, a ScrollerSlider inside cabinet-seats, as a stop after the last seat, and the same inside cabinet-candidates once a seat is open. Before a seat is opened only the seat list's bar is in the order, so the default Cabinet has one stray stop and an open seat has two. |
FocusScroll.BarsAreNotTabStops takes a view's scrollers, their sliders and their arrow buttons out of the Tab order; CabinetPresenter calls it for both views. Focusability only: dragging the bar and the wheel are untouched. |
| K4 | A city panel button that the press itself leaves gone or disabled drops the focus. The Assign stepper's minus disables itself at 0 (GddHexPanel, SetEnabled(target > 0)), so after the press that reaches 0 the K2 fix hands the focus to a disabled button, Focus() does not take, and nothing has the focus: the next Tab starts again at Cabinet, which is the H2 symptom K2 was meant to end. Build, Stop and a project's Cancel are the same shape: Build disables every Build in the part once one group is ordered, and Stop and Cancel leave a state line and a disabled button. |
FocusReturn.ToOrWithin focuses the rebuilt button of the same name when it can take the focus, and otherwise the nearest control that can, trying the part, then the host it was in, then the other host, and last the map stop the panel was opened from, so the next Tab carries on from where the player was. |
KeyboardTurnTests asserted the K1 behaviour, that the Tab after the last seat lands on a scroll bar. That
assertion is inverted with K3, since the stop is gone.
Pinned in EditMode: CabinetScrollFocusTests (no scroll bar takes a stop in the Cabinet, with and without a
seat open), CityPanelFocusTests (the Assign minus at 0 keeps the focus inside the city panel) and
SitePanelFocusTests (a Build order, which disables every Build in its part, leaves the focus on something that
can hold it). No UI string was added, so nothing goes to #564.
The screen-entry fix, 23 October 2026
The last of the three items the 23 October list left open (K5). Found on main c389b492 before the change, with an
EditMode test that fails without it.
| Finding | Fix | |
|---|---|---|
| K5 | Opening a screen from the side rail leaves the focus on the rail button. A screen's content sits after the whole HUD in the Tab order, so reaching it means walking the rail's eight buttons, New Game, End Turn, the minimap's three buttons and star, report and share first. Walked in EditMode: 16 Tabs for the Cabinet and the Budget, 14 for Defence, the count being only where the player's button sits in the rail. ScreenNav.Close already hands the focus back to the rail button, so open was the asymmetric half. |
ScreenNav.Open hands the focus to the screen it opened, after the screen's OnOpened action has built its rows. The screen's own X is first in its order, since the header is its first child, so the focus goes to the first control of the screen's content and the X stays one Shift+Tab back; a screen with no control of its own that can take the focus (Defence at the opening turn, whose ladder and call-up buttons are display:none) takes its X. Only a keyboard press hands the focus on, as Close already respects, so a mouse press still moves no focus. |
A scroll bar is never the landing control: defence-body's scroller otherwise comes before any control of Defence's
own. When K5 landed, the bars of the screens other than the Cabinet took no Tab stop but their sliders were still
focusable, so one would have become a stop as soon as its list overflowed. K6 below closes that: every bar is out of
the Tab order now.
Pinned in EditMode: ScreenEntryTests (the Cabinet and the Budget land on their first control; Defence, which has
none usable yet, lands on its X; a pointer press hands no focus; Escape still returns it to the rail button). No UI
string was added, so nothing goes to #564.
Every scroll bar out of the Tab order, 23 October 2026
K3 again, wider. #1453 took the Cabinet's two views out of the Tab order, which is where the 23 October list found
the stop. That was the whole of the finding as written, but not the whole of the bug: every other view's slider
stayed focusable, and a ScrollView hides its scroller only while its content fits, so the stop returns the
moment a view overflows.
Walked in EditMode. At 1280x720, the opening turn, no screen stops on a bar, because every scroller but the seat
list's is display:none:
| screen | bar stops in one lap | scroller shown | slider focusable |
|---|---|---|---|
cabinet (cabinet-seats) |
0 | yes | no, #1453 |
budget (budget-rows) |
0 | no | yes |
defence (defence-body) |
0 | no | yes |
why (why-rows) |
0 | no | yes |
timeline (timeline-list) |
0 | no | yes |
how to play (how-to-play-body) |
0 | no | yes |
objectives (objectives-rows) |
0 | no | yes |
At 1280x420, the short window this audit already used a pass at, the views overflow and the stops are real: the Budget's bar and Defence's each take one, and the Cabinet still takes none. Defence is the worst case, since it has no control of its own at the opening turn, so its bar is very nearly all a keyboard player can land on. (An earlier draft of this section said Defence took two. That was the walk counting the same slider twice on two laps of a short screen, not two bars; the walk counts unique elements now.)
| Finding | Fix | |
|---|---|---|
| K6 | Only the Cabinet's bars were out of the Tab order. Every other scroll view's slider was still focusable, so the stop came back whenever the view overflowed: a shorter window, or enough content in the list. event-scroll, capture-scroll, turn-report-rows and end-screen-rows are not on any screen's walk and were never checked at all. |
FocusScroll.NoScrollBarIsATabStop applies the existing BarsAreNotTabStops to every ScrollView under the UI root, called once from GameRoot beside FocusScroll. CabinetPresenter keeps its own call, because many tests build that presenter without GameRoot and the Cabinet should not depend on the harness. |
The reasoning is K3's, not wider: a bar is always in sight, a list is reached by Tabbing its rows, and the lists
that hold labels only (why-rows, defence-body, the event card's text) have nothing to Tab to, while KeyScroll
gives PageUp, PageDown, Home and End with or without focus. Focusability only: dragging and the wheel are untouched.
The turn report (turn-report-rows), the ending (end-screen-rows), the capture dialog (capture-scroll) and the
info panel (info-panel) were first left out of the sweep, because KeyScroll had no target for them and GameRoot
switched the paging keys off under the turn report and the ending, so their bar was the only keyboard route. Since
#2479 they take PageUp, PageDown, Home and End through KeyScroll too (the topmost of the ending and the turn report
first, then the capture dialog, then the info panel while it is in reach), GameRoot pages under the report and the
ending, and their bars are out of the Tab order like every other view's. Up and Down still move nothing under the turn
report or the ending (GameRoot's guard on NavigationGuard.Step, L4).
Pinned in EditMode: ScrollBarTabStopTests (in a 1280x420 window the Budget's and Defence's bars take no stop,
with the overflow asserted as a precondition so the test cannot pass vacuously; the Cabinet stays at zero; no
ScrollView in the tree keeps a focusable scroller, slider or arrow button). No UI string was added, so nothing goes
to #564.
The focus rule looks past the element's own display, 23 October 2026
K7, found while the owner was reviewing the screen-entry fix (#1489) and fixed in #1507. Not a symptom anyone could reach in play: a trap left in the rule the other three fixes all lean on.
FocusReturn.CanTakeFocus decides whether handing an element the focus will work. It asked
whether the element itself is drawn:
e?.panel != null && e.focusable && e.enabledInHierarchy && e.resolvedStyle.display != DisplayStyle.None
display: none on a parent takes its children out of the layout, but each child keeps its own
resolvedStyle.display. So a control inside a closed screen still reads Flex, passed the test,
and then would not take the focus: Focus() did nothing and nothing had the focus, which is the
one outcome the rule exists to prevent.
| Finding | Fix | |
|---|---|---|
| K7 | CanTakeFocus tested the element's own display only, so anything inside a display: none parent passed and then refused the focus. Measured on main, a closed screen being the plain case: screen-close-budget reports ownDisplay=Flex, enabledInHierarchy=True, CanTakeFocus=True, and after Focus() the focused element is <null>. The same for screen-cabinet and screen-objectives. |
CanTakeFocus walks from the element up to the panel and refuses if any ancestor is display: none, so such a control is skipped and a usable fallback takes the focus instead. |
It was a trap rather than a live bug, and the distinction is worth keeping: every caller passes
scopes inside an open panel, so no shipped path reached it. What it cost was the next caller who
handed ToOrWithin a hidden subtree, who would have got a silent focus drop instead of the
fallback.
One thing the fix had to avoid breaking: ScreenNav.HandFocusTo runs in the same call that opens a
screen (K5), so the walk could have rejected every control in a screen whose resolvedStyle had
not caught up, and sent the focus to the X instead of the first control. It does not, because
ScreenNav.Show sets window.style.display = DisplayStyle.Flex inline, and UI Toolkit
reflects an inline style in resolvedStyle straight away rather than at the next panel pass.
Measured from inside HandFocusTo: screen-cabinet resolvedDisplay=Flex inlineDisplay=Flex, and
the same for the Budget and Defence. If Show ever moves to a class or a stylesheet rule instead,
that stops being true and the walk would need to trust an inline style.display.
Pinned in EditMode: FocusHiddenParentTests (ToOrWithin with a closed screen as its only scope
leaves the focus on the last stop instead of dropping it; and a drawn scope still gives up its own
first control, asserted on minimap-overview so the fallback cannot satisfy the test). No UI
string was added, so nothing goes to #564.
The WebGL companion: off and unavailable for now, owner 2 November 2026
Status: off and unavailable for now (owner, 2 November 2026). The owner asked to "disable the game companion" and
chose "Remove it from the game (Recommended)": "A small PR before tonight's nightly hides it entirely: no Settings row,
and ?companion=1 does nothing. The code stays in, switched off by one flag, so it can come back later." That flag is
WebCompanion.Available, now false. While it is false WebCompanion.On is false whatever the switch, the stored
choice or the address says, GameRoot gives Settings no switch, so the row stays hidden as it is outside WebGL, and the
page's panel stays hidden because the game never publishes to it. WebCompanionUnavailableTests pins this. The
rest of this section describes the companion as it works with the flag on (what WebCompanionTests runs, through the WebCompanion.Offered test seam), from the opt-in ruling of 1 November 2026.
The first step proposed under H5 is the read-only WebGL companion (#1119, PR #1920): an HTML panel beside the canvas
(WebGLTemplates/Statecraft/index.html, WebCompanion.jslib) that mirrors the open event, its choices, the game's focus,
the status line and the End Turn report, with the status line as its one live region.
The owner's ruling, 1 November 2026, on whether every WebGL player gets the panel: "Opt-in for now (Recommended)". It holds until the VoiceOver test on a real screen reader and the phone layout are done. So the companion is off by default and turns on in one of two ways:
- the Settings row "Screen reader companion" (
settings.companion), which shows only in the WebGL player; it applies at once, is kept with the other settings, and once pressed it wins over the address for the rest of that page's visit; ?companion=1in the page address, a whole query parameter with the whole value1(?companion=0,?companionand?companion=10do not turn it on). The owner's ruling, 2 November 2026: "Link wins, that visit (Recommended)". The address turns the companion on for that visit even over a stored "off", and the saved choice is not changed.
WebCompanion.On holds the rule. WebCompanionTests pins it, the Settings row and the real root (off at start, on and
off from Settings, kept for a later game; the address over a stored "off" for that visit only). The page carries the panel's skeleton from load, hidden, so with the
companion off there is no empty landmark or heading in the accessibility tree. The first snapshot shows the panel and
writes its status line in a later task, so the live region is in the tree before its first announcement; a repeated
status on a new turn is also cleared and written again in a later task. Whether VoiceOver announces both is part of the
pending VoiceOver test.
Screenshots
In .superpowers/a11y-2026-10-14/ (1568x752 unless noted), with the driver and the contrast, colour-vision and
measurement scripts in tools/. short-window/ holds the first pass in a 1568x609 viewport at device pixel ratio 2,
where the candidate list had no height.