@cssints/apg-specs 0.0.0-stage → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -2
  3. package/dist/apg/accordion.bridge.d.mts +35 -0
  4. package/dist/apg/accordion.bridge.mjs +326 -0
  5. package/dist/apg/accordion.model.json +8397 -0
  6. package/dist/apg/alert.bridge.d.mts +22 -0
  7. package/dist/apg/alert.bridge.mjs +86 -0
  8. package/dist/apg/alert.model.json +871 -0
  9. package/dist/apg/alertdialog.bridge.d.mts +21 -0
  10. package/dist/apg/alertdialog.bridge.mjs +221 -0
  11. package/dist/apg/alertdialog.model.json +5232 -0
  12. package/dist/apg/breadcrumb.bridge.d.mts +26 -0
  13. package/dist/apg/breadcrumb.bridge.mjs +120 -0
  14. package/dist/apg/breadcrumb.model.json +574 -0
  15. package/dist/apg/button.bridge.d.mts +35 -0
  16. package/dist/apg/button.bridge.mjs +208 -0
  17. package/dist/apg/button.model.json +5814 -0
  18. package/dist/apg/carousel.bridge.d.mts +44 -0
  19. package/dist/apg/carousel.bridge.mjs +262 -0
  20. package/dist/apg/carousel.model.json +8963 -0
  21. package/dist/apg/checkbox-group.bridge.d.mts +25 -0
  22. package/dist/apg/checkbox-group.bridge.mjs +276 -0
  23. package/dist/apg/checkbox-group.model.json +3863 -0
  24. package/dist/apg/checkbox.bridge.d.mts +34 -0
  25. package/dist/apg/checkbox.bridge.mjs +253 -0
  26. package/dist/apg/checkbox.model.json +3158 -0
  27. package/dist/apg/combobox-autocomplete.bridge.d.mts +14 -0
  28. package/dist/apg/combobox-autocomplete.bridge.mjs +326 -0
  29. package/dist/apg/combobox-autocomplete.model.json +11586 -0
  30. package/dist/apg/combobox-dialog.bridge.d.mts +17 -0
  31. package/dist/apg/combobox-dialog.bridge.mjs +250 -0
  32. package/dist/apg/combobox-dialog.model.json +8981 -0
  33. package/dist/apg/combobox-grid.bridge.d.mts +17 -0
  34. package/dist/apg/combobox-grid.bridge.mjs +227 -0
  35. package/dist/apg/combobox-grid.model.json +8554 -0
  36. package/dist/apg/combobox-select-only.bridge.d.mts +24 -0
  37. package/dist/apg/combobox-select-only.bridge.mjs +304 -0
  38. package/dist/apg/combobox-select-only.model.json +7846 -0
  39. package/dist/apg/combobox-tree.bridge.d.mts +17 -0
  40. package/dist/apg/combobox-tree.bridge.mjs +211 -0
  41. package/dist/apg/combobox-tree.model.json +9345 -0
  42. package/dist/apg/dialog-modal.bridge.d.mts +35 -0
  43. package/dist/apg/dialog-modal.bridge.mjs +186 -0
  44. package/dist/apg/dialog-modal.model.json +7580 -0
  45. package/dist/apg/disclosure.bridge.d.mts +25 -0
  46. package/dist/apg/disclosure.bridge.mjs +202 -0
  47. package/dist/apg/disclosure.model.json +4703 -0
  48. package/dist/apg/feed.bridge.d.mts +31 -0
  49. package/dist/apg/feed.bridge.mjs +246 -0
  50. package/dist/apg/feed.model.json +4523 -0
  51. package/dist/apg/grid-selection.bridge.d.mts +13 -0
  52. package/dist/apg/grid-selection.bridge.mjs +160 -0
  53. package/dist/apg/grid-selection.model.json +6974 -0
  54. package/dist/apg/grid-sort.bridge.d.mts +12 -0
  55. package/dist/apg/grid-sort.bridge.mjs +138 -0
  56. package/dist/apg/grid-sort.model.json +3799 -0
  57. package/dist/apg/grid.bridge.d.mts +54 -0
  58. package/dist/apg/grid.bridge.mjs +441 -0
  59. package/dist/apg/grid.model.json +3802 -0
  60. package/dist/apg/link.bridge.d.mts +24 -0
  61. package/dist/apg/link.bridge.mjs +126 -0
  62. package/dist/apg/link.model.json +694 -0
  63. package/dist/apg/listbox-multi.bridge.d.mts +10 -0
  64. package/dist/apg/listbox-multi.bridge.mjs +261 -0
  65. package/dist/apg/listbox-multi.model.json +10893 -0
  66. package/dist/apg/listbox-rearrangeable.bridge.d.mts +20 -0
  67. package/dist/apg/listbox-rearrangeable.bridge.mjs +237 -0
  68. package/dist/apg/listbox-rearrangeable.model.json +17592 -0
  69. package/dist/apg/listbox-shared.d.mts +58 -0
  70. package/dist/apg/listbox-shared.mjs +171 -0
  71. package/dist/apg/listbox-single.bridge.d.mts +10 -0
  72. package/dist/apg/listbox-single.bridge.mjs +196 -0
  73. package/dist/apg/listbox-single.model.json +8024 -0
  74. package/dist/apg/listbox-typeahead.bridge.d.mts +10 -0
  75. package/dist/apg/listbox-typeahead.bridge.mjs +153 -0
  76. package/dist/apg/listbox-typeahead.model.json +5615 -0
  77. package/dist/apg/menu-button.bridge.d.mts +29 -0
  78. package/dist/apg/menu-button.bridge.mjs +259 -0
  79. package/dist/apg/menu-button.model.json +5706 -0
  80. package/dist/apg/menu-checkable.bridge.d.mts +25 -0
  81. package/dist/apg/menu-checkable.bridge.mjs +226 -0
  82. package/dist/apg/menu-checkable.model.json +4277 -0
  83. package/dist/apg/menu-menubar.bridge.d.mts +27 -0
  84. package/dist/apg/menu-menubar.bridge.mjs +273 -0
  85. package/dist/apg/menu-menubar.model.json +9540 -0
  86. package/dist/apg/meter.bridge.d.mts +28 -0
  87. package/dist/apg/meter.bridge.mjs +159 -0
  88. package/dist/apg/meter.model.json +1185 -0
  89. package/dist/apg/player.bridge.d.mts +24 -0
  90. package/dist/apg/player.bridge.mjs +342 -0
  91. package/dist/apg/player.model.json +11013 -0
  92. package/dist/apg/radio.bridge.d.mts +35 -0
  93. package/dist/apg/radio.bridge.mjs +371 -0
  94. package/dist/apg/radio.model.json +5011 -0
  95. package/dist/apg/slider-multithumb.bridge.d.mts +34 -0
  96. package/dist/apg/slider-multithumb.bridge.mjs +365 -0
  97. package/dist/apg/slider-multithumb.model.json +5774 -0
  98. package/dist/apg/slider.bridge.d.mts +54 -0
  99. package/dist/apg/slider.bridge.mjs +359 -0
  100. package/dist/apg/slider.model.json +4881 -0
  101. package/dist/apg/spinbutton.bridge.d.mts +41 -0
  102. package/dist/apg/spinbutton.bridge.mjs +327 -0
  103. package/dist/apg/spinbutton.model.json +7571 -0
  104. package/dist/apg/switch.bridge.d.mts +30 -0
  105. package/dist/apg/switch.bridge.mjs +243 -0
  106. package/dist/apg/switch.model.json +3159 -0
  107. package/dist/apg/tabs.bridge.d.mts +41 -0
  108. package/dist/apg/tabs.bridge.mjs +294 -0
  109. package/dist/apg/tabs.model.json +7659 -0
  110. package/dist/apg/timeline.bridge.d.mts +36 -0
  111. package/dist/apg/timeline.bridge.mjs +265 -0
  112. package/dist/apg/timeline.model.json +6189 -0
  113. package/dist/apg/toolbar.bridge.d.mts +25 -0
  114. package/dist/apg/toolbar.bridge.mjs +307 -0
  115. package/dist/apg/toolbar.model.json +6616 -0
  116. package/dist/apg/tooltip.bridge.d.mts +36 -0
  117. package/dist/apg/tooltip.bridge.mjs +208 -0
  118. package/dist/apg/tooltip.model.json +8295 -0
  119. package/dist/apg/treegrid.bridge.d.mts +28 -0
  120. package/dist/apg/treegrid.bridge.mjs +311 -0
  121. package/dist/apg/treegrid.model.json +17358 -0
  122. package/dist/apg/treeview.bridge.d.mts +26 -0
  123. package/dist/apg/treeview.bridge.mjs +396 -0
  124. package/dist/apg/treeview.model.json +13745 -0
  125. package/dist/apg/windowsplitter.bridge.d.mts +36 -0
  126. package/dist/apg/windowsplitter.bridge.mjs +242 -0
  127. package/dist/apg/windowsplitter.model.json +6253 -0
  128. package/dist/canvas/camera.model.json +6568 -0
  129. package/dist/canvas/canvas.bridge.d.mts +190 -0
  130. package/dist/canvas/canvas.bridge.mjs +729 -0
  131. package/dist/canvas/pointer.model.json +17095 -0
  132. package/dist/scenario.d.mts +233 -0
  133. package/dist/scenario.mjs +313 -0
  134. package/package.json +57 -4
  135. package/scenarios/apg/README.md +221 -0
  136. package/scenarios/apg/accordion.base-ui.json +1005 -0
  137. package/scenarios/apg/accordion.react-aria.json +929 -0
  138. package/scenarios/apg/alert.base-ui.json +81 -0
  139. package/scenarios/apg/alert.react-aria.json +98 -0
  140. package/scenarios/apg/alertdialog.base-ui.json +331 -0
  141. package/scenarios/apg/alertdialog.react-aria.json +225 -0
  142. package/scenarios/apg/breadcrumb.react-aria.json +312 -0
  143. package/scenarios/apg/button.ariakit.json +136 -0
  144. package/scenarios/apg/button.base-ui.json +747 -0
  145. package/scenarios/apg/button.react-aria.json +443 -0
  146. package/scenarios/apg/carousel.apg.json +909 -0
  147. package/scenarios/apg/checkbox.ariakit.json +299 -0
  148. package/scenarios/apg/checkbox.base-ui.json +1126 -0
  149. package/scenarios/apg/checkbox.react-aria.json +518 -0
  150. package/scenarios/apg/combobox.ariakit.json +945 -0
  151. package/scenarios/apg/combobox.base-ui.json +2444 -0
  152. package/scenarios/apg/combobox.react-aria.json +845 -0
  153. package/scenarios/apg/dialog-modal.ariakit.json +1102 -0
  154. package/scenarios/apg/dialog-modal.base-ui.json +775 -0
  155. package/scenarios/apg/dialog-modal.react-aria.json +638 -0
  156. package/scenarios/apg/disclosure.apg.json +349 -0
  157. package/scenarios/apg/disclosure.ariakit.json +163 -0
  158. package/scenarios/apg/disclosure.base-ui.json +451 -0
  159. package/scenarios/apg/disclosure.react-aria.json +643 -0
  160. package/scenarios/apg/feed.apg.json +442 -0
  161. package/scenarios/apg/grid.ariakit.json +197 -0
  162. package/scenarios/apg/grid.base-ui.json +720 -0
  163. package/scenarios/apg/grid.react-aria.json +969 -0
  164. package/scenarios/apg/landmarks.ariakit.json +93 -0
  165. package/scenarios/apg/landmarks.react-aria.json +330 -0
  166. package/scenarios/apg/link.ariakit.json +83 -0
  167. package/scenarios/apg/link.base-ui.json +88 -0
  168. package/scenarios/apg/link.react-aria.json +186 -0
  169. package/scenarios/apg/listbox.ariakit.json +78 -0
  170. package/scenarios/apg/listbox.base-ui.json +163 -0
  171. package/scenarios/apg/listbox.react-aria.json +1118 -0
  172. package/scenarios/apg/menu-button.ariakit.json +924 -0
  173. package/scenarios/apg/menu-button.base-ui.json +1155 -0
  174. package/scenarios/apg/menu-button.react-aria.json +1080 -0
  175. package/scenarios/apg/menubar.ariakit.json +758 -0
  176. package/scenarios/apg/menubar.base-ui.json +673 -0
  177. package/scenarios/apg/meter.base-ui.json +243 -0
  178. package/scenarios/apg/meter.react-aria.json +201 -0
  179. package/scenarios/apg/radio.ariakit.json +459 -0
  180. package/scenarios/apg/radio.base-ui.json +581 -0
  181. package/scenarios/apg/radio.react-aria.json +576 -0
  182. package/scenarios/apg/slider-multithumb.base-ui.json +316 -0
  183. package/scenarios/apg/slider-multithumb.react-aria.json +363 -0
  184. package/scenarios/apg/slider.base-ui.json +544 -0
  185. package/scenarios/apg/slider.react-aria.json +456 -0
  186. package/scenarios/apg/spinbutton.base-ui.json +1688 -0
  187. package/scenarios/apg/spinbutton.react-aria.json +426 -0
  188. package/scenarios/apg/switch.base-ui.json +456 -0
  189. package/scenarios/apg/switch.react-aria.json +303 -0
  190. package/scenarios/apg/table.ariakit.json +65 -0
  191. package/scenarios/apg/table.react-aria.json +221 -0
  192. package/scenarios/apg/tabs.ariakit.json +329 -0
  193. package/scenarios/apg/tabs.base-ui.json +875 -0
  194. package/scenarios/apg/tabs.react-aria.json +644 -0
  195. package/scenarios/apg/toolbar.ariakit.json +595 -0
  196. package/scenarios/apg/toolbar.base-ui.json +1189 -0
  197. package/scenarios/apg/toolbar.react-aria.json +383 -0
  198. package/scenarios/apg/tooltip.ariakit.json +441 -0
  199. package/scenarios/apg/tooltip.base-ui.json +411 -0
  200. package/scenarios/apg/tooltip.react-aria.json +454 -0
  201. package/scenarios/apg/treegrid.apg.json +2558 -0
  202. package/scenarios/apg/treegrid.react-aria.json +5094 -0
  203. package/scenarios/apg/treeview.apg.json +928 -0
  204. package/scenarios/apg/windowsplitter.apg.json +557 -0
  205. package/scenarios/canvas/README.md +69 -0
  206. package/scenarios/canvas/camera.contract.json +237 -0
  207. package/scenarios/canvas/camera.excalidraw.json +57 -0
  208. package/scenarios/canvas/marquee.excalidraw.json +122 -0
  209. package/scenarios/canvas/pan.excalidraw.json +46 -0
  210. package/scenarios/canvas/pointer.contract.json +528 -0
  211. package/scenarios/parts.json +291 -0
  212. package/shared/aria.qnt +186 -0
  213. package/shared/details-group.qnt +50 -0
  214. package/shared/focusgroup.qnt +152 -0
  215. package/shared/invokers.qnt +81 -0
  216. package/shared/popover.qnt +71 -0
  217. package/specs/apg/STATIC.md +103 -0
  218. package/specs/apg/accordion.qnt +578 -0
  219. package/specs/apg/alert.qnt +131 -0
  220. package/specs/apg/alertdialog.qnt +455 -0
  221. package/specs/apg/breadcrumb.qnt +88 -0
  222. package/specs/apg/button.qnt +445 -0
  223. package/specs/apg/carousel.qnt +732 -0
  224. package/specs/apg/checkbox-group.qnt +388 -0
  225. package/specs/apg/checkbox.qnt +394 -0
  226. package/specs/apg/combobox-autocomplete.qnt +764 -0
  227. package/specs/apg/combobox-dialog.qnt +627 -0
  228. package/specs/apg/combobox-grid.qnt +632 -0
  229. package/specs/apg/combobox-select-only.qnt +626 -0
  230. package/specs/apg/combobox-tree.qnt +633 -0
  231. package/specs/apg/dialog-modal.qnt +499 -0
  232. package/specs/apg/disclosure.qnt +309 -0
  233. package/specs/apg/feed.qnt +485 -0
  234. package/specs/apg/grid-selection.qnt +512 -0
  235. package/specs/apg/grid-sort.qnt +330 -0
  236. package/specs/apg/grid.qnt +360 -0
  237. package/specs/apg/link.qnt +119 -0
  238. package/specs/apg/listbox-multi.qnt +799 -0
  239. package/specs/apg/listbox-rearrangeable.qnt +801 -0
  240. package/specs/apg/listbox-single.qnt +511 -0
  241. package/specs/apg/listbox-typeahead.qnt +396 -0
  242. package/specs/apg/menu-button.qnt +363 -0
  243. package/specs/apg/menu-checkable.qnt +304 -0
  244. package/specs/apg/menu-menubar.qnt +531 -0
  245. package/specs/apg/meter.qnt +129 -0
  246. package/specs/apg/player.qnt +1081 -0
  247. package/specs/apg/radio.qnt +394 -0
  248. package/specs/apg/slider-multithumb.qnt +441 -0
  249. package/specs/apg/slider.qnt +396 -0
  250. package/specs/apg/spinbutton.qnt +494 -0
  251. package/specs/apg/switch.qnt +389 -0
  252. package/specs/apg/tabs.qnt +412 -0
  253. package/specs/apg/timeline.qnt +612 -0
  254. package/specs/apg/toolbar.qnt +364 -0
  255. package/specs/apg/tooltip.qnt +553 -0
  256. package/specs/apg/treegrid.qnt +983 -0
  257. package/specs/apg/treeview.qnt +1004 -0
  258. package/specs/apg/windowsplitter.qnt +487 -0
  259. package/specs/canvas/camera.qnt +407 -0
  260. package/specs/canvas/pointer.qnt +841 -0
@@ -0,0 +1,747 @@
1
+ {
2
+ "pattern": "button",
3
+ "source": "base-ui",
4
+ "commit": "19511bb171f3b360b006c94cf6d07e53cb446505",
5
+ "license": "MIT",
6
+ "skipped": [
7
+ {
8
+ "reason": "describeConformance blocks (ref instance, render-prop conformance, component prop)"
9
+ },
10
+ {
11
+ "reason": "form submission, native HTML validation and external-form tests"
12
+ },
13
+ {
14
+ "reason": "React render-prop plumbing assertions (composite props, tabIndex through render)"
15
+ },
16
+ { "reason": "SSR/hydration and id-generation tests" },
17
+ {
18
+ "reason": "test.skipIf(isJSDOM) browser-only hover tests are ported as pointer steps where they assert behaviour"
19
+ },
20
+ { "reason": "console-warning tests" },
21
+ {
22
+ "reason": "data-* style hooks (data-pressed, data-multiple, data-disabled) unless the upstream assertion is about state"
23
+ },
24
+ { "reason": "styling/class assertions" }
25
+ ],
26
+ "scenarios": [
27
+ {
28
+ "id": "button.base-ui.custom-link-space-activates-without-scroll",
29
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L17",
30
+ "upstreamTest": "prop: nativeButton > custom link element: Space activates the link without scrolling the page",
31
+ "apg": "keyboard",
32
+ "config": { "nativeButton": false, "render": "a", "href": "#target" },
33
+ "steps": [
34
+ { "event": "key", "key": "Tab" },
35
+ { "expect": { "focus": "button" } },
36
+ { "event": "key", "key": " ", "target": "button" },
37
+ { "expect": { "events": { "onClick": [1] } } },
38
+ { "event": "key", "key": " ", "target": "button", "phase": "up" }
39
+ ],
40
+ "notes": "Space keydown must call preventDefault (no page scroll); only the click callback is asserted here."
41
+ },
42
+ {
43
+ "id": "button.base-ui.custom-element-keyboard-activation",
44
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L42",
45
+ "upstreamTest": "prop: nativeButton > custom element: applies button semantics and dispatches real clicks from keyboard activation",
46
+ "apg": "keyboard",
47
+ "config": { "nativeButton": false, "render": "span" },
48
+ "steps": [
49
+ { "event": "prop", "set": {} },
50
+ {
51
+ "expect": {
52
+ "attrs": { "button": { "role": "button", "tabindex": "0" } }
53
+ }
54
+ },
55
+ { "event": "key", "key": "Tab" },
56
+ { "expect": { "focus": "button" } },
57
+ { "event": "key", "key": "Enter", "target": "button" },
58
+ { "event": "key", "key": " ", "target": "button" },
59
+ { "expect": { "events": { "onClick": [2], "onClickCapture": [2] } } }
60
+ ],
61
+ "notes": "Both Enter and Space dispatch a real click that bubbles to render/capture and ancestor handlers."
62
+ },
63
+ {
64
+ "id": "button.base-ui.custom-element-keyboard-click-modifiers",
65
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L78",
66
+ "upstreamTest": "prop: nativeButton > custom element: keyboard activation clicks carry modifier key state",
67
+ "apg": "keyboard",
68
+ "config": { "nativeButton": false, "render": "span" },
69
+ "steps": [
70
+ { "event": "key", "key": "Tab" },
71
+ { "expect": { "focus": "button" } },
72
+ {
73
+ "event": "key",
74
+ "key": "Enter",
75
+ "target": "button",
76
+ "modifiers": ["Shift"]
77
+ },
78
+ { "expect": { "events": { "onClick": [{ "shiftKey": true }] } } }
79
+ ],
80
+ "notes": "Synthetic click from keyboard retains the modifier keys held during activation."
81
+ },
82
+ {
83
+ "id": "button.base-ui.native-disabled-attribute-and-no-events",
84
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L100",
85
+ "upstreamTest": "prop: disabled > native button: uses the disabled attribute and is not focusable",
86
+ "apg": "states",
87
+ "config": { "disabled": true, "nativeButton": true },
88
+ "steps": [
89
+ { "event": "prop", "set": {} },
90
+ {
91
+ "expect": {
92
+ "attrs": { "button": { "disabled": "", "aria-disabled": null } }
93
+ }
94
+ },
95
+ { "event": "key", "key": "Tab" },
96
+ { "expect": { "focus": null } },
97
+ { "event": "click", "target": "button" },
98
+ { "event": "key", "key": " ", "target": "button" },
99
+ { "event": "key", "key": "Enter", "target": "button" },
100
+ {
101
+ "expect": {
102
+ "events": {
103
+ "onClick": [0],
104
+ "onMouseDown": [0],
105
+ "onPointerDown": [0],
106
+ "onKeyDown": [0]
107
+ }
108
+ }
109
+ }
110
+ ],
111
+ "notes": "Native disabled button is removed from tab order and swallows click/mouse/pointer/key handlers."
112
+ },
113
+ {
114
+ "id": "button.base-ui.custom-disabled-aria-tabindex-no-events",
115
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L135",
116
+ "upstreamTest": "prop: disabled > custom element: applies aria-disabled and is not focusable",
117
+ "apg": "states",
118
+ "config": { "disabled": true, "nativeButton": false, "render": "span" },
119
+ "steps": [
120
+ { "event": "prop", "set": {} },
121
+ {
122
+ "expect": {
123
+ "attrs": {
124
+ "button": {
125
+ "disabled": null,
126
+ "aria-disabled": "true",
127
+ "tabindex": "-1"
128
+ }
129
+ }
130
+ }
131
+ },
132
+ { "event": "key", "key": "Tab" },
133
+ { "expect": { "focus": null } },
134
+ { "event": "click", "target": "button" },
135
+ { "event": "key", "key": " ", "target": "button" },
136
+ { "event": "key", "key": "Enter", "target": "button" },
137
+ { "expect": { "events": { "onClick": [0], "onKeyDown": [0] } } }
138
+ ],
139
+ "notes": "Custom disabled element uses aria-disabled=true and tabindex=-1."
140
+ },
141
+ {
142
+ "id": "button.base-ui.focusable-when-disabled-native",
143
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L175",
144
+ "upstreamTest": "prop: focusableWhenDisabled > native button: prevents interactions but remains focusable",
145
+ "apg": "extension",
146
+ "config": {
147
+ "disabled": true,
148
+ "focusableWhenDisabled": true,
149
+ "nativeButton": true
150
+ },
151
+ "steps": [
152
+ { "event": "prop", "set": {} },
153
+ {
154
+ "expect": {
155
+ "attrs": {
156
+ "button": {
157
+ "disabled": null,
158
+ "aria-disabled": "true",
159
+ "tabindex": "0"
160
+ }
161
+ }
162
+ }
163
+ },
164
+ { "event": "key", "key": "Tab" },
165
+ { "expect": { "focus": "button" } },
166
+ { "event": "click", "target": "button" },
167
+ { "event": "key", "key": " ", "target": "button" },
168
+ { "event": "key", "key": "Enter", "target": "button" },
169
+ { "expect": { "events": { "onClick": [0], "onKeyDown": [0] } } }
170
+ ],
171
+ "notes": "Disabled-but-focusable stays in the tab order but activation is suppressed."
172
+ },
173
+ {
174
+ "id": "button.base-ui.focusable-when-disabled-allows-hover-blocks-activation",
175
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L212",
176
+ "upstreamTest": "prop: focusableWhenDisabled > native button: allows hover handlers while blocking activation",
177
+ "apg": "extension",
178
+ "config": {
179
+ "disabled": true,
180
+ "focusableWhenDisabled": true,
181
+ "nativeButton": true
182
+ },
183
+ "steps": [
184
+ { "event": "hover", "target": "button" },
185
+ { "expect": { "events": { "onMouseMove": [1] } } },
186
+ { "event": "click", "target": "button" },
187
+ { "expect": { "events": { "onClick": [0] } } }
188
+ ],
189
+ "notes": "Hover still fires on a disabled-but-focusable button; click is still blocked."
190
+ },
191
+ {
192
+ "id": "button.base-ui.keeps-focus-after-becoming-disabled",
193
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L243",
194
+ "upstreamTest": "prop: focusableWhenDisabled > keeps focus and suppresses interactions after becoming disabled",
195
+ "apg": "extension",
196
+ "config": { "focusableWhenDisabled": true },
197
+ "steps": [
198
+ { "event": "key", "key": "Tab" },
199
+ { "expect": { "focus": "button" } },
200
+ { "event": "click", "target": "button" },
201
+ { "expect": { "focus": "button", "events": { "onClick": [1] } } },
202
+ { "event": "click", "target": "button" },
203
+ { "event": "key", "key": "Enter", "target": "button" },
204
+ { "event": "key", "key": " ", "target": "button" },
205
+ {
206
+ "expect": {
207
+ "focus": "button",
208
+ "attrs": { "button": { "aria-disabled": "true" } },
209
+ "events": { "onClick": [1] }
210
+ }
211
+ }
212
+ ],
213
+ "notes": "The first click sets disabled state; focus is retained but further activation is suppressed."
214
+ },
215
+ {
216
+ "id": "button.base-ui.focusable-when-disabled-custom",
217
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/button/Button.test.tsx#L284",
218
+ "upstreamTest": "prop: focusableWhenDisabled > custom element: prevents interactions but remains focusable",
219
+ "apg": "extension",
220
+ "config": {
221
+ "disabled": true,
222
+ "focusableWhenDisabled": true,
223
+ "nativeButton": false,
224
+ "render": "span"
225
+ },
226
+ "steps": [
227
+ { "event": "prop", "set": {} },
228
+ {
229
+ "expect": {
230
+ "attrs": {
231
+ "button": {
232
+ "disabled": null,
233
+ "aria-disabled": "true",
234
+ "tabindex": "0"
235
+ }
236
+ }
237
+ }
238
+ },
239
+ { "event": "key", "key": "Tab" },
240
+ { "expect": { "focus": "button" } },
241
+ { "event": "click", "target": "button" },
242
+ { "event": "key", "key": " ", "target": "button" },
243
+ { "event": "key", "key": "Enter", "target": "button" },
244
+ { "expect": { "events": { "onClick": [0], "onKeyDown": [0] } } }
245
+ ],
246
+ "notes": "Same disabled-but-focusable contract on a non-native element."
247
+ },
248
+ {
249
+ "id": "button.base-ui.toggle-controlled-pressed",
250
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L19",
251
+ "upstreamTest": "<Toggle /> > pressed state > controlled",
252
+ "apg": "aria",
253
+ "config": { "part": "button", "pressed": false },
254
+ "steps": [
255
+ { "event": "prop", "set": { "pressed": false } },
256
+ { "expect": { "attrs": { "button": { "aria-pressed": "false" } } } },
257
+ { "event": "prop", "set": { "pressed": true } },
258
+ { "expect": { "attrs": { "button": { "aria-pressed": "true" } } } },
259
+ { "event": "prop", "set": { "pressed": false } },
260
+ { "expect": { "attrs": { "button": { "aria-pressed": "false" } } } }
261
+ ],
262
+ "notes": "aria-pressed mirrors the controlled pressed prop, not internal clicks."
263
+ },
264
+ {
265
+ "id": "button.base-ui.toggle-uncontrolled-click",
266
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L48",
267
+ "upstreamTest": "<Toggle /> > pressed state > uncontrolled",
268
+ "apg": "aria",
269
+ "config": { "part": "button", "defaultPressed": false },
270
+ "steps": [
271
+ { "event": "prop", "set": {} },
272
+ { "expect": { "attrs": { "button": { "aria-pressed": "false" } } } },
273
+ { "event": "click", "target": "button" },
274
+ { "expect": { "attrs": { "button": { "aria-pressed": "true" } } } },
275
+ { "event": "click", "target": "button" },
276
+ { "expect": { "attrs": { "button": { "aria-pressed": "false" } } } }
277
+ ],
278
+ "notes": "Click toggles aria-pressed for an uncontrolled toggle."
279
+ },
280
+ {
281
+ "id": "button.base-ui.toggle-onpressedchange",
282
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L69",
283
+ "upstreamTest": "prop: onPressedChange > is called when the pressed state changes",
284
+ "apg": "extension",
285
+ "config": { "part": "button", "defaultPressed": false },
286
+ "steps": [
287
+ { "event": "click", "target": "button" },
288
+ {
289
+ "expect": { "events": { "onPressedChange": [true], "onClick": [1] } }
290
+ }
291
+ ],
292
+ "notes": "Callback receives the next pressed value."
293
+ },
294
+ {
295
+ "id": "button.base-ui.toggle-cancel-prevents-press",
296
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L84",
297
+ "upstreamTest": "prop: onPressedChange > does not change the pressed state when the event is canceled",
298
+ "apg": "extension",
299
+ "config": {
300
+ "part": "button",
301
+ "defaultPressed": false,
302
+ "cancelOnPressedChange": true
303
+ },
304
+ "steps": [
305
+ { "event": "click", "target": "button" },
306
+ { "expect": { "attrs": { "button": { "aria-pressed": "false" } } } }
307
+ ],
308
+ "notes": "eventDetails.cancel() vetoes the state transition."
309
+ },
310
+ {
311
+ "id": "button.base-ui.toggle-group-cancel-prevents-group-change",
312
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L103",
313
+ "upstreamTest": "prop: onPressedChange > canceling in a grouped Toggle prevents the group value from changing",
314
+ "apg": "extension",
315
+ "config": { "group": true, "cancelOnPressedChange": "first" },
316
+ "steps": [
317
+ { "event": "click", "target": "button:0" },
318
+ {
319
+ "expect": {
320
+ "attrs": {
321
+ "button:0": { "aria-pressed": "false" },
322
+ "button:1": { "aria-pressed": "false" }
323
+ },
324
+ "events": { "onValueChange": [0] }
325
+ }
326
+ }
327
+ ],
328
+ "notes": "A canceled toggle never fires the group's onValueChange."
329
+ },
330
+ {
331
+ "id": "button.base-ui.toggle-disabled",
332
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle/Toggle.test.tsx#L130",
333
+ "upstreamTest": "prop: disabled > disables the component",
334
+ "apg": "states",
335
+ "config": { "part": "button", "disabled": true },
336
+ "steps": [
337
+ { "event": "prop", "set": {} },
338
+ {
339
+ "expect": {
340
+ "attrs": {
341
+ "button": {
342
+ "disabled": "",
343
+ "data-disabled": "",
344
+ "aria-pressed": "false"
345
+ }
346
+ }
347
+ }
348
+ },
349
+ { "event": "click", "target": "button" },
350
+ {
351
+ "expect": {
352
+ "attrs": { "button": { "aria-pressed": "false" } },
353
+ "events": { "onPressedChange": [0] }
354
+ }
355
+ }
356
+ ],
357
+ "notes": "Disabled toggle uses the disabled attribute and ignores clicks."
358
+ },
359
+ {
360
+ "id": "button.base-ui.toggle-group-renders-group",
361
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L19",
362
+ "upstreamTest": "<ToggleGroup /> > renders a `group`",
363
+ "apg": "aria",
364
+ "config": { "aria-label": "My Toggle Group" },
365
+ "steps": [
366
+ { "event": "prop", "set": {} },
367
+ {
368
+ "expect": {
369
+ "attrs": {
370
+ "group": { "role": "group", "aria-label": "My Toggle Group" }
371
+ }
372
+ }
373
+ }
374
+ ],
375
+ "notes": "Group exposes role=group with its accessible name."
376
+ },
377
+ {
378
+ "id": "button.base-ui.toggle-group-uncontrolled-single-press",
379
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L26",
380
+ "upstreamTest": "uncontrolled > pressed state",
381
+ "apg": "states",
382
+ "config": { "group": true, "multiple": false },
383
+ "steps": [
384
+ { "event": "prop", "set": {} },
385
+ {
386
+ "expect": {
387
+ "attrs": {
388
+ "button:0": { "aria-pressed": "false" },
389
+ "button:1": { "aria-pressed": "false" }
390
+ }
391
+ }
392
+ },
393
+ { "event": "click", "target": "button:0" },
394
+ {
395
+ "expect": {
396
+ "attrs": {
397
+ "button:0": { "aria-pressed": "true" },
398
+ "button:1": { "aria-pressed": "false" }
399
+ }
400
+ }
401
+ },
402
+ { "event": "click", "target": "button:1" },
403
+ {
404
+ "expect": {
405
+ "attrs": {
406
+ "button:0": { "aria-pressed": "false" },
407
+ "button:1": { "aria-pressed": "true" }
408
+ }
409
+ }
410
+ }
411
+ ],
412
+ "notes": "Single-select group keeps at most one item pressed."
413
+ },
414
+ {
415
+ "id": "button.base-ui.toggle-group-default-value",
416
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L56",
417
+ "upstreamTest": "uncontrolled > prop: defaultValue",
418
+ "apg": "states",
419
+ "config": { "group": true, "defaultValue": ["two"] },
420
+ "steps": [
421
+ { "event": "prop", "set": {} },
422
+ {
423
+ "expect": {
424
+ "attrs": {
425
+ "button:0": { "aria-pressed": "false" },
426
+ "button:1": { "aria-pressed": "true" }
427
+ }
428
+ }
429
+ },
430
+ { "event": "click", "target": "button:0" },
431
+ {
432
+ "expect": {
433
+ "attrs": {
434
+ "button:0": { "aria-pressed": "true" },
435
+ "button:1": { "aria-pressed": "false" }
436
+ }
437
+ }
438
+ }
439
+ ],
440
+ "notes": "defaultValue seeds the uncontrolled selection."
441
+ },
442
+ {
443
+ "id": "button.base-ui.toggle-group-controlled-value",
444
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L118",
445
+ "upstreamTest": "controlled > pressed state",
446
+ "apg": "states",
447
+ "config": { "group": true, "value": ["two"] },
448
+ "steps": [
449
+ { "event": "prop", "set": { "value": ["two"] } },
450
+ {
451
+ "expect": {
452
+ "attrs": {
453
+ "button:0": { "aria-pressed": "false" },
454
+ "button:1": { "aria-pressed": "true" }
455
+ }
456
+ }
457
+ },
458
+ { "event": "prop", "set": { "value": ["one"] } },
459
+ {
460
+ "expect": {
461
+ "attrs": {
462
+ "button:0": { "aria-pressed": "true" },
463
+ "button:1": { "aria-pressed": "false" }
464
+ }
465
+ }
466
+ }
467
+ ],
468
+ "notes": "Controlled group follows the value prop."
469
+ },
470
+ {
471
+ "id": "button.base-ui.toggle-group-disabled-group",
472
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L168",
473
+ "upstreamTest": "prop: disabled > can disable the whole group",
474
+ "apg": "states",
475
+ "config": { "group": true, "disabled": true },
476
+ "steps": [
477
+ { "event": "prop", "set": {} },
478
+ {
479
+ "expect": {
480
+ "attrs": {
481
+ "button:0": { "aria-disabled": "true" },
482
+ "button:1": { "aria-disabled": "true" }
483
+ }
484
+ }
485
+ }
486
+ ],
487
+ "notes": "Group disabled propagates aria-disabled to every item."
488
+ },
489
+ {
490
+ "id": "button.base-ui.toggle-group-disabled-individual",
491
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L184",
492
+ "upstreamTest": "prop: disabled > can disable individual items",
493
+ "apg": "states",
494
+ "config": { "group": true, "disabledIndex": 1 },
495
+ "steps": [
496
+ { "event": "prop", "set": {} },
497
+ {
498
+ "expect": {
499
+ "attrs": {
500
+ "button:0": { "aria-disabled": "false" },
501
+ "button:1": { "aria-disabled": "true" }
502
+ }
503
+ }
504
+ }
505
+ ],
506
+ "notes": "Per-item disabled only affects that item."
507
+ },
508
+ {
509
+ "id": "button.base-ui.toggle-group-orientation",
510
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L202",
511
+ "upstreamTest": "prop: orientation > vertical / does not render aria-orientation on role=group",
512
+ "apg": "extension",
513
+ "config": { "group": true, "orientation": "vertical" },
514
+ "steps": [
515
+ { "event": "prop", "set": {} },
516
+ {
517
+ "expect": {
518
+ "attrs": {
519
+ "group": {
520
+ "data-orientation": "vertical",
521
+ "aria-orientation": null
522
+ }
523
+ }
524
+ }
525
+ }
526
+ ],
527
+ "notes": "Orientation is exposed via data-orientation; aria-orientation is not set on role=group."
528
+ },
529
+ {
530
+ "id": "button.base-ui.toggle-group-multiple-selection",
531
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L245",
532
+ "upstreamTest": "prop: multiple > multiple items can be pressed when true",
533
+ "apg": "states",
534
+ "config": { "group": true, "multiple": true, "defaultValue": ["one"] },
535
+ "steps": [
536
+ { "event": "prop", "set": {} },
537
+ {
538
+ "expect": {
539
+ "attrs": {
540
+ "button:0": { "aria-pressed": "true" },
541
+ "button:1": { "aria-pressed": "false" }
542
+ }
543
+ }
544
+ },
545
+ { "event": "click", "target": "button:1" },
546
+ {
547
+ "expect": {
548
+ "attrs": {
549
+ "button:0": { "aria-pressed": "true" },
550
+ "button:1": { "aria-pressed": "true" }
551
+ }
552
+ }
553
+ }
554
+ ],
555
+ "notes": "Multiple mode allows more than one pressed item."
556
+ },
557
+ {
558
+ "id": "button.base-ui.toggle-group-single-selection",
559
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L264",
560
+ "upstreamTest": "prop: multiple > only one item can be pressed when false",
561
+ "apg": "states",
562
+ "config": { "group": true, "multiple": false, "defaultValue": ["one"] },
563
+ "steps": [
564
+ { "event": "click", "target": "button:1" },
565
+ {
566
+ "expect": {
567
+ "attrs": {
568
+ "button:0": { "aria-pressed": "false" },
569
+ "button:1": { "aria-pressed": "true" }
570
+ }
571
+ }
572
+ }
573
+ ],
574
+ "notes": "Single mode replaces the pressed item."
575
+ },
576
+ {
577
+ "id": "button.base-ui.toggle-group-keyboard-horizontal-ltr",
578
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L380",
579
+ "upstreamTest": "keyboard interactions > ltr > orientation: horizontal",
580
+ "apg": "keyboard",
581
+ "config": {
582
+ "group": true,
583
+ "direction": "ltr",
584
+ "orientation": "horizontal",
585
+ "items": 3
586
+ },
587
+ "steps": [
588
+ { "event": "key", "key": "Tab" },
589
+ {
590
+ "expect": {
591
+ "focus": "button:0",
592
+ "attrs": { "button:0": { "tabindex": "0" } }
593
+ }
594
+ },
595
+ { "event": "key", "key": "ArrowRight", "target": "button:0" },
596
+ {
597
+ "expect": {
598
+ "focus": "button:1",
599
+ "attrs": { "button:1": { "tabindex": "0" } }
600
+ }
601
+ },
602
+ { "event": "key", "key": "ArrowRight", "target": "button:1" },
603
+ { "expect": { "focus": "button:2" } },
604
+ { "event": "key", "key": "ArrowRight", "target": "button:2" },
605
+ { "expect": { "focus": "button:0" } },
606
+ { "event": "key", "key": "ArrowLeft", "target": "button:0" },
607
+ { "expect": { "focus": "button:2" } },
608
+ { "event": "key", "key": "ArrowDown", "target": "button:2" },
609
+ { "expect": { "focus": "button:2" } },
610
+ { "event": "key", "key": "ArrowUp", "target": "button:2" },
611
+ { "expect": { "focus": "button:2" } }
612
+ ],
613
+ "notes": "Roving tabindex wraps around; the other axis is ignored. rtl/vertical matrix variants omitted for brevity."
614
+ },
615
+ {
616
+ "id": "button.base-ui.toggle-group-keyboard-vertical",
617
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L380",
618
+ "upstreamTest": "keyboard interactions > ltr > orientation: vertical",
619
+ "apg": "keyboard",
620
+ "config": {
621
+ "group": true,
622
+ "direction": "ltr",
623
+ "orientation": "vertical",
624
+ "items": 3
625
+ },
626
+ "steps": [
627
+ { "event": "key", "key": "Tab" },
628
+ { "expect": { "focus": "button:0" } },
629
+ { "event": "key", "key": "ArrowDown", "target": "button:0" },
630
+ { "expect": { "focus": "button:1" } },
631
+ { "event": "key", "key": "ArrowDown", "target": "button:1" },
632
+ { "expect": { "focus": "button:2" } },
633
+ { "event": "key", "key": "ArrowDown", "target": "button:2" },
634
+ { "expect": { "focus": "button:0" } },
635
+ { "event": "key", "key": "ArrowUp", "target": "button:0" },
636
+ { "expect": { "focus": "button:2" } },
637
+ { "event": "key", "key": "ArrowRight", "target": "button:2" },
638
+ { "expect": { "focus": "button:2" } }
639
+ ],
640
+ "notes": "Vertical orientation uses ArrowDown/ArrowUp; horizontal arrows are ignored."
641
+ },
642
+ {
643
+ "id": "button.base-ui.toggle-group-home-key",
644
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L438",
645
+ "upstreamTest": "keyboard interactions > Home key moves focus to the first item",
646
+ "apg": "keyboard",
647
+ "config": { "group": true, "items": 3 },
648
+ "steps": [
649
+ { "event": "key", "key": "Tab" },
650
+ { "expect": { "focus": "button:0" } },
651
+ { "event": "key", "key": "ArrowRight", "target": "button:0" },
652
+ { "event": "key", "key": "ArrowRight", "target": "button:1" },
653
+ { "expect": { "focus": "button:2" } },
654
+ { "event": "key", "key": "Home", "target": "button:2" },
655
+ {
656
+ "expect": {
657
+ "focus": "button:0",
658
+ "attrs": { "button:0": { "tabindex": "0" } }
659
+ }
660
+ }
661
+ ],
662
+ "notes": "Home moves roving focus to the first item."
663
+ },
664
+ {
665
+ "id": "button.base-ui.toggle-group-end-key",
666
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L467",
667
+ "upstreamTest": "keyboard interactions > End key moves focus to the last item",
668
+ "apg": "keyboard",
669
+ "config": { "group": true, "items": 3 },
670
+ "steps": [
671
+ { "event": "key", "key": "Tab" },
672
+ { "expect": { "focus": "button:0" } },
673
+ { "event": "key", "key": "End", "target": "button:0" },
674
+ {
675
+ "expect": {
676
+ "focus": "button:2",
677
+ "attrs": { "button:2": { "tabindex": "0" } }
678
+ }
679
+ }
680
+ ],
681
+ "notes": "End moves roving focus to the last item."
682
+ },
683
+ {
684
+ "id": "button.base-ui.toggle-group-enter-space-toggles",
685
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L494",
686
+ "upstreamTest": "keyboard interactions > key: Enter/Space toggles the pressed state",
687
+ "apg": "keyboard",
688
+ "config": { "group": true, "key": "Space" },
689
+ "steps": [
690
+ { "event": "focus", "target": "button:0" },
691
+ { "expect": { "attrs": { "button:0": { "aria-pressed": "false" } } } },
692
+ { "event": "key", "key": " ", "target": "button:0" },
693
+ { "expect": { "attrs": { "button:0": { "aria-pressed": "true" } } } },
694
+ { "event": "key", "key": " ", "target": "button:0" },
695
+ { "expect": { "attrs": { "button:0": { "aria-pressed": "false" } } } }
696
+ ],
697
+ "notes": "Enter behaves the same (upstream runs the assertion for both keys)."
698
+ },
699
+ {
700
+ "id": "button.base-ui.toggle-group-on-value-change-click",
701
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L522",
702
+ "upstreamTest": "prop: onValueChange > fires when an Item is clicked",
703
+ "apg": "extension",
704
+ "config": { "group": true },
705
+ "steps": [
706
+ { "event": "click", "target": "button:0" },
707
+ { "expect": { "events": { "onValueChange": [["one"]] } } },
708
+ { "event": "click", "target": "button:1" },
709
+ { "expect": { "events": { "onValueChange": [["two"]] } } }
710
+ ],
711
+ "notes": "Fires with the new value array after each click."
712
+ },
713
+ {
714
+ "id": "button.base-ui.toggle-group-cancel-value-change",
715
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L547",
716
+ "upstreamTest": "prop: onValueChange > does not change the value when the event is canceled",
717
+ "apg": "extension",
718
+ "config": { "group": true, "cancelOnValueChange": true },
719
+ "steps": [
720
+ { "event": "click", "target": "button:0" },
721
+ {
722
+ "expect": {
723
+ "attrs": { "button:0": { "aria-pressed": "false" } },
724
+ "events": { "onValueChange": [["one"]] }
725
+ }
726
+ }
727
+ ],
728
+ "notes": "The callback still fires, but cancel() leaves the state untouched."
729
+ },
730
+ {
731
+ "id": "button.base-ui.toggle-group-on-value-change-keyboard",
732
+ "upstream": "https://github.com/mui/base-ui/blob/19511bb171f3b360b006c94cf6d07e53cb446505/packages/react/src/toggle-group/ToggleGroup.test.tsx#L568",
733
+ "upstreamTest": "prop: onValueChange > fires when the Enter/Space is pressed",
734
+ "apg": "keyboard",
735
+ "config": { "group": true, "key": "Space" },
736
+ "steps": [
737
+ { "event": "focus", "target": "button:0" },
738
+ { "event": "key", "key": " ", "target": "button:0" },
739
+ { "expect": { "events": { "onValueChange": [["one"]] } } },
740
+ { "event": "focus", "target": "button:1" },
741
+ { "event": "key", "key": " ", "target": "button:1" },
742
+ { "expect": { "events": { "onValueChange": [["two"]] } } }
743
+ ],
744
+ "notes": "Enter is covered by the same upstream forEach."
745
+ }
746
+ ]
747
+ }