From 49c2d745ebe6166efbd2a5c48a4fbd40ce371f62 Mon Sep 17 00:00:00 2001 From: JoshHeaps Date: Fri, 11 Sep 2026 18:49:42 -0600 Subject: [PATCH] Let the keyboard into the sheets, and stop dropping it on the floor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modal answers one question for all six overlays — where focus goes and how Tab is held — and this round it was measured as wrong in three directions. Its list of Tab stops could not see a . The rulings sheet is twelve of them and one Done button, so the trap decided Done was both ends of the ring: eighty Tab presses, one element ever reached, twelve rulings that could not be opened without a mouse. Adding `details > summary` gives the sheet its thirteen stops back. `:not([tabindex="-1"])` moves onto every line while it is open, because a control taken out of the Tab order still matches `button`. "The first control" was the card picker's Clear: the sheet a dealer opens to write a card down opened on the button that rubs one out. A sheet names its own landing spot now, and on five of six it is the heading — which says which seat, which card, which pot. The confirm dialog keeps a control, because a short question with one irreversible answer should land on the answer that leaves the dealer no worse off. And a sheet that redraws itself was deleting the control that held focus. Choosing a buy-in, picking a card, switching slots, confirming a side pot — all four left focus on the document body. Rebuilt controls carry a name now and are handed back to whoever had them; where there is no coming back, the caller says where to go instead. The card grid was fifty-two Tab stops of the fifty-six in that sheet. It is one now, with the arrows moving inside it, stepping over cards already dealt and stopping at the edges rather than wrapping onto a different rank. 1136 tests, 418 audits clean. --- JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml | 38 +- JoshHeaps.Net/wwwroot/css/casino/holdem.css | 21 +- .../wwwroot/js/casino/holdem/addChips.js | 11 + .../wwwroot/js/casino/holdem/cardPicker.js | 146 +++++-- .../wwwroot/js/casino/holdem/modal.js | 88 ++++- .../wwwroot/js/casino/holdem/potWizard.js | 18 + .../wwwroot/js/casino/holdem/seatMenu.js | 12 + tests/holdem/load.js | 6 + tests/holdem/theKeyboardInASheet.test.js | 374 ++++++++++++++++++ 9 files changed, 662 insertions(+), 52 deletions(-) create mode 100644 tests/holdem/theKeyboardInASheet.test.js diff --git a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml index 896ee76..e522916 100644 --- a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml +++ b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml @@ -480,7 +480,7 @@