
Make card elements focusable via tabindex="0" and add arrow-key focus cycling, Enter/Space activation, so the game board is operable without a mouse. Currently cards are non-focusable divs and all keyboard shortcuts require prior mouse selection.
Context
Cards are created as plain <div> elements with no tabindex attribute, making them invisible to keyboard navigation. The existing keyboard handler in keyboard.js only operates on a selectedCard variable that is set exclusively by the mouse grab event in card.js. A keyboard-only user cannot select, flip, rotate, or interact with any card. Adding tabindex="0" to cards, arrow-key focus cycling between .game-card elements, and Enter/Space as activation keys (flip) closes this accessibility gap with a bounded change to two files.
Affected Files
src/scripts/card.js:7 — Add tabindex="0" to the cardElement created in createCard
src/scripts/card.js:29 — Add a focus event listener that calls selectCard so keyboard focus and selection stay in sync
src/scripts/keyboard.js:27 — Add ArrowLeft/ArrowRight cases to cycle focus between .game-card elements, and Enter/Space to toggle flip
src/scripts/keyboard.test.js — Add tests for arrow-key focus cycling and Enter/Space flip activation
Requirements

Verification
- grep -n 'tabindex' src/scripts/card.js
- grep -n 'Arrow' src/scripts/keyboard.js
- npm test -- --reporter=verbose 2>&1 | grep -iE 'arrow|enter|space|tabindex|focus'
- npm test
Not In Scope
- Do not add ARIA live regions or screen-reader announcements
- Do not change the visual styling of focused cards beyond what the browser provides natively
- Do not add keyboard navigation for tokens or decks in this issue
Evidence
src/scripts/card.js:7 — cardElement is created via document.createElement("div") with no tabindex — it is not keyboard-focusable
src/scripts/keyboard.js:27-44 — Switch statement handles only r, R, f, F, Delete, Escape — no ArrowLeft, ArrowRight, Enter, or Space cases
src/scripts/card.js:33-36 — The grab event listener calls selectCard, but grab is only dispatched by mouse mousedown — no keyboard path sets selection
Arasaka Queue Planning Division.

Make card elements focusable via
tabindex="0"and add arrow-key focus cycling, Enter/Space activation, so the game board is operable without a mouse. Currently cards are non-focusable divs and all keyboard shortcuts require prior mouse selection.Context
Cards are created as plain
<div>elements with notabindexattribute, making them invisible to keyboard navigation. The existing keyboard handler inkeyboard.jsonly operates on aselectedCardvariable that is set exclusively by the mousegrabevent incard.js. A keyboard-only user cannot select, flip, rotate, or interact with any card. Addingtabindex="0"to cards, arrow-key focus cycling between.game-cardelements, and Enter/Space as activation keys (flip) closes this accessibility gap with a bounded change to two files.Affected Files
src/scripts/card.js:7— Addtabindex="0"to thecardElementcreated increateCardsrc/scripts/card.js:29— Add afocusevent listener that callsselectCardso keyboard focus and selection stay in syncsrc/scripts/keyboard.js:27— AddArrowLeft/ArrowRightcases to cycle focus between.game-cardelements, andEnter/Spaceto toggle flipsrc/scripts/keyboard.test.js— Add tests for arrow-key focus cycling and Enter/Space flip activationRequirements
createCardhastabindex="0"so it appears in the tab orderArrowRightmoves focus to the next.game-cardsibling in DOM order;ArrowLeftmoves to the previousEnterorSpaceon a focused card toggles itsflippedclass, matching theFkey behaviorselectCardso R/F/Delete shortcuts operate on the focused cardVerification
Not In Scope
Evidence
src/scripts/card.js:7—cardElementis created viadocument.createElement("div")with notabindex— it is not keyboard-focusablesrc/scripts/keyboard.js:27-44— Switch statement handles onlyr,R,f,F,Delete,Escape— noArrowLeft,ArrowRight,Enter, orSpacecasessrc/scripts/card.js:33-36— Thegrabevent listener callsselectCard, butgrabis only dispatched by mousemousedown— no keyboard path sets selectionArasaka Queue Planning Division.