Skip to content

Commit 15cd652

Browse files
hyperpolymathclaude
andcommitted
feat: KeyboardNav adopted across 94/123 components (359 onActivate calls)
Batch adoption of KeyboardNav.onActivate alongside Events.onClick for keyboard accessibility (Enter/Space activation). 94 of 123 components now support keyboard navigation. 29 remaining have complex conditional onClick patterns requiring manual attention. Also added KeyboardNav.clickable() convenience bundle for future use. System Update Panel backend verified DONE (8 Rust commands, fully wired). 766 modules compile clean, 0 errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5b27dbe commit 15cd652

95 files changed

Lines changed: 365 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/components/AccessibilityToolbar.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ let renderPanel = (state: accessibilityState): Tea_Vdom.t<msg> => {
228228
Attrs.title("Close accessibility panel"),
229229
Attrs.ariaLabel("Close accessibility panel"),
230230
Events.onClick(AccessibilityCtrl(ToggleAccessibilityToolbar)),
231+
KeyboardNav.onActivate(AccessibilityCtrl(ToggleAccessibilityToolbar)),
231232
},
232233
list{text("X")},
233234
),
@@ -293,6 +294,7 @@ let view = (state: accessibilityState): Tea_Vdom.t<msg> => {
293294
state.toolbarExpanded ? "Close accessibility settings" : "Open accessibility settings",
294295
),
295296
Events.onClick(AccessibilityCtrl(ToggleAccessibilityToolbar)),
297+
KeyboardNav.onActivate(AccessibilityCtrl(ToggleAccessibilityToolbar)),
296298
},
297299
list{
298300
// Accessibility icon (universal access symbol approximation using text)

src/components/Aerie.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ let view = (aerie: aerieState): Tea_Vdom.t<msg> => {
109109
"px-3 py-1 text-xs bg-violet-600 text-white rounded hover:bg-violet-500",
110110
),
111111
Events.onClick(Aerie(LoadAerie)),
112+
KeyboardNav.onActivate(Aerie(LoadAerie)),
112113
},
113114
list{text("Refresh")},
114115
),
@@ -118,6 +119,7 @@ let view = (aerie: aerieState): Tea_Vdom.t<msg> => {
118119
"px-3 py-1 text-sm bg-gray-800 text-gray-300 rounded hover:bg-gray-700",
119120
),
120121
Events.onClick(PanelSwitcher(ClosePanels)),
122+
KeyboardNav.onActivate(PanelSwitcher(ClosePanels)),
121123
},
122124
list{text("Close")},
123125
),
@@ -141,6 +143,7 @@ let view = (aerie: aerieState): Tea_Vdom.t<msg> => {
141143
list{
142144
Attrs.class_("px-4 py-2 bg-violet-600 text-white rounded hover:bg-violet-500"),
143145
Events.onClick(Aerie(LoadAerie)),
146+
KeyboardNav.onActivate(Aerie(LoadAerie)),
144147
},
145148
list{text("Connect to Aerie")},
146149
),

src/components/AgenticBridge.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ let view = (state: agenticBridgeState): Tea_Vdom.t<msg> => {
8888
"px-3 py-1 text-xs bg-amber-800 hover:bg-amber-700 text-white rounded",
8989
),
9090
Events.onClick(AgenticBridge(AbStarted)),
91+
KeyboardNav.onActivate(AgenticBridge(AbStarted)),
9192
},
9293
list{text("Launch All")},
9394
),
@@ -168,6 +169,7 @@ let view = (state: agenticBridgeState): Tea_Vdom.t<msg> => {
168169
list{
169170
Attrs.class_("text-red-400 hover:text-red-200 text-xs ml-2"),
170171
Events.onClick(AgenticBridge(DismissAbError)),
172+
KeyboardNav.onActivate(AgenticBridge(DismissAbError)),
171173
},
172174
list{text("Dismiss")},
173175
),

src/components/Ai.res

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ let renderInputArea = (ai: aiState): Tea_Vdom.t<msg> => {
344344
),
345345
Attrs.disabled(ai.loading || ai.inputText === ""),
346346
Events.onClick(Ai(SendMessage)),
347+
KeyboardNav.onActivate(Ai(SendMessage)),
347348
},
348349
list{text("Send")},
349350
),
@@ -389,13 +390,15 @@ let renderInputArea = (ai: aiState): Tea_Vdom.t<msg> => {
389390
: "text-gray-600 hover:text-gray-400"}`,
390391
),
391392
Events.onClick(Ai(ToggleBroadcast)),
393+
KeyboardNav.onActivate(Ai(ToggleBroadcast)),
392394
},
393395
list{text("Broadcast")},
394396
),
395397
button(
396398
list{
397399
Attrs.class_("text-gray-600 hover:text-gray-400 transition-colors"),
398400
Events.onClick(Ai(ClearAiHistory)),
401+
KeyboardNav.onActivate(Ai(ClearAiHistory)),
399402
},
400403
list{text("Clear")},
401404
),
@@ -710,6 +713,7 @@ let view = (ai: aiState): Tea_Vdom.t<msg> => {
710713
"px-4 py-2 bg-gray-800 text-gray-300 rounded hover:bg-gray-700 transition-colors",
711714
),
712715
Events.onClick(PanelSwitcher(ClosePanels)),
716+
KeyboardNav.onActivate(PanelSwitcher(ClosePanels)),
713717
},
714718
list{text("Close")},
715719
),

src/components/AmbientOps.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ let view = (state: ambientOpsState): Tea_Vdom.t<msg> => {
131131
"px-3 py-1 text-xs rounded bg-teal-700 text-white hover:bg-teal-600",
132132
),
133133
Events.onClick(AmbientOps(RunDiagnostics)),
134+
KeyboardNav.onActivate(AmbientOps(RunDiagnostics)),
134135
},
135136
list{
136137
text(
@@ -166,6 +167,7 @@ let view = (state: ambientOpsState): Tea_Vdom.t<msg> => {
166167
"mx-4 mt-2 px-3 py-2 bg-red-900/50 border border-red-700 rounded text-sm text-red-200",
167168
),
168169
Events.onClick(AmbientOps(DismissOpsError)),
170+
KeyboardNav.onActivate(AmbientOps(DismissOpsError)),
169171
},
170172
list{text(err)},
171173
)

src/components/ArchitectMode.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ let view = (state: architectModeState): Tea_Vdom.t<msg> => {
186186
list{
187187
Attrs.class_("text-red-400 hover:text-red-200 text-xs ml-2"),
188188
Events.onClick(ArchitectMode(DismissArchModeError)),
189+
KeyboardNav.onActivate(ArchitectMode(DismissArchModeError)),
189190
},
190191
list{text("Dismiss")},
191192
),

src/components/AssetManager.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ let view = (state: assetManagerState): Tea_Vdom.t<msg> => {
9292
list{
9393
Attrs.class_("px-3 py-1 text-xs bg-pink-800 hover:bg-pink-700 text-white rounded"),
9494
Events.onClick(AssetManager(AmStarted)),
95+
KeyboardNav.onActivate(AssetManager(AmStarted)),
9596
},
9697
list{text("Import")},
9798
),
@@ -196,6 +197,7 @@ let view = (state: assetManagerState): Tea_Vdom.t<msg> => {
196197
list{
197198
Attrs.class_("text-red-400 hover:text-red-200 text-xs ml-2"),
198199
Events.onClick(AssetManager(DismissAmError)),
200+
KeyboardNav.onActivate(AssetManager(DismissAmError)),
199201
},
200202
list{text("Dismiss")},
201203
),

src/components/AutomationBridge.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ let view = (state: automationBridgeState): Tea_Vdom.t<msg> => {
7474
"px-3 py-1 text-xs bg-emerald-800 hover:bg-emerald-700 text-white rounded",
7575
),
7676
Events.onClick(AutomationBridge(AutoBStarted)),
77+
KeyboardNav.onActivate(AutomationBridge(AutoBStarted)),
7778
},
7879
list{text("Trigger Build")},
7980
),
@@ -152,6 +153,7 @@ let view = (state: automationBridgeState): Tea_Vdom.t<msg> => {
152153
list{
153154
Attrs.class_("text-red-400 hover:text-red-200 text-xs ml-2"),
154155
Events.onClick(AutomationBridge(DismissAutoBError)),
156+
KeyboardNav.onActivate(AutomationBridge(DismissAutoBError)),
155157
},
156158
list{text("Dismiss")},
157159
),

src/components/AutomationRouter.res

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ let renderDashboard = (state: automationRouterState): Tea_Vdom.t<msg> => {
9494
},
9595
),
9696
Events.onClick(AutomationRouter(ToggleGlobalEnabled)),
97+
KeyboardNav.onActivate(AutomationRouter(ToggleGlobalEnabled)),
9798
},
9899
list{
99100
text(
@@ -196,6 +197,7 @@ let renderRules = (state: automationRouterState): Tea_Vdom.t<msg> => {
196197
},
197198
),
198199
Events.onClick(AutomationRouter(ToggleShowDisabled)),
200+
KeyboardNav.onActivate(AutomationRouter(ToggleShowDisabled)),
199201
},
200202
list{text("Show Disabled")},
201203
),
@@ -315,6 +317,7 @@ let renderPending = (state: automationRouterState): Tea_Vdom.t<msg> => {
315317
"px-3 py-1.5 text-xs bg-emerald-700 text-white rounded hover:bg-emerald-600 cursor-pointer",
316318
),
317319
Events.onClick(AutomationRouter(ApproveAll)),
320+
KeyboardNav.onActivate(AutomationRouter(ApproveAll)),
318321
},
319322
list{text("Approve All")},
320323
),
@@ -324,6 +327,7 @@ let renderPending = (state: automationRouterState): Tea_Vdom.t<msg> => {
324327
"px-3 py-1.5 text-xs bg-red-800 text-red-200 rounded hover:bg-red-700 cursor-pointer",
325328
),
326329
Events.onClick(AutomationRouter(RejectAll)),
330+
KeyboardNav.onActivate(AutomationRouter(RejectAll)),
327331
},
328332
list{text("Reject All")},
329333
),
@@ -482,6 +486,7 @@ let renderSettings = (state: automationRouterState): Tea_Vdom.t<msg> => {
482486
},
483487
),
484488
Events.onClick(AutomationRouter(LoadFromRepo)),
489+
KeyboardNav.onActivate(AutomationRouter(LoadFromRepo)),
485490
},
486491
list{text("Load from Repo")},
487492
),
@@ -491,6 +496,7 @@ let renderSettings = (state: automationRouterState): Tea_Vdom.t<msg> => {
491496
"px-3 py-1.5 text-xs bg-gray-700 text-gray-300 rounded hover:bg-gray-600 cursor-pointer",
492497
),
493498
Events.onClick(AutomationRouter(SaveRules)),
499+
KeyboardNav.onActivate(AutomationRouter(SaveRules)),
494500
},
495501
list{text("Save Rules")},
496502
),
@@ -512,6 +518,7 @@ let renderSettings = (state: automationRouterState): Tea_Vdom.t<msg> => {
512518
},
513519
),
514520
Events.onClick(AutomationRouter(ToggleShowDisabled)),
521+
KeyboardNav.onActivate(AutomationRouter(ToggleShowDisabled)),
515522
},
516523
list{text("Show Disabled Rules")},
517524
),
@@ -567,6 +574,7 @@ let view = (state: automationRouterState): Tea_Vdom.t<msg> => {
567574
},
568575
),
569576
Events.onClick(AutomationRouter(ToggleAutomationBojRouting)),
577+
KeyboardNav.onActivate(AutomationRouter(ToggleAutomationBojRouting)),
570578
},
571579
list{
572580
text(
@@ -584,6 +592,7 @@ let view = (state: automationRouterState): Tea_Vdom.t<msg> => {
584592
"px-3 py-1.5 text-xs bg-gray-700 text-gray-300 rounded hover:bg-gray-600 cursor-pointer",
585593
),
586594
Events.onClick(AutomationRouter(LoadRules)),
595+
KeyboardNav.onActivate(AutomationRouter(LoadRules)),
587596
},
588597
list{text("Refresh")},
589598
),

src/components/BalanceAnalyser.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ let view = (state: balanceAnalyserState): Tea_Vdom.t<msg> => {
481481
"px-3 py-1.5 text-xs bg-emerald-700 text-white rounded hover:bg-emerald-600 cursor-pointer font-medium",
482482
),
483483
Events.onClick(BalanceAnalyser(RunSimulation)),
484+
KeyboardNav.onActivate(BalanceAnalyser(RunSimulation)),
484485
},
485486
list{text("Run Simulation")},
486487
),

0 commit comments

Comments
 (0)