@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,1118 @@
1
+ {
2
+ "pattern": "listbox",
3
+ "source": "react-aria",
4
+ "commit": "99e610236887da619ad9d54a1cd87983166c043d",
5
+ "license": "Apache-2.0",
6
+ "skipped": [
7
+ {
8
+ "reason": "styling and DOM-shape assertions: default/custom classes, data-rac, data-foo/data-bar DOM props, custom render/render-as-link, slots, refs, hover/press/focus-ring class hooks, sections and group markup (react-aria-components ListBox.test.js)"
9
+ },
10
+ {
11
+ "reason": "collection lifecycle and React-only APIs: dynamic collections, non-object entries, render-function changes, item moving between sections, descendants updating, duplicate keys across React Activity boundaries, React 19 Activity/portal, SSR (react-aria-components ListBox.test.js)"
12
+ },
13
+ {
14
+ "reason": "async loading and virtualization: renderEmptyState, ListBoxLoadMoreItem sentinel, IntersectionObserver load-more, virtualizer row height/overscan, scroll position (react-aria-components and @adobe ListBox.test.js)"
15
+ },
16
+ {
17
+ "reason": "drag and drop: draggable items, drop indicators, onReorder/onItemDrop/onRootDrop, grid drag layouts, Alt+Enter drag mode (react-aria-components ListBox.test.js)"
18
+ },
19
+ {
20
+ "reason": "links and router integration: href options, mockClickDefault navigation, RouterProvider (react-aria-components and @adobe ListBox.test.js)"
21
+ },
22
+ {
23
+ "reason": "modal/dialog integration: Escape clears selection then closes the dialog (react-aria-components ListBox.test.js)"
24
+ },
25
+ {
26
+ "reason": "callback plumbing that only counts handler invocations without an observable state change: per-item onKeyDown/onKeyUp, list-level onScroll, onHoverStart/onHoverEnd counting, press-event interactionType matrix, long-press timing matrix (react-aria-components ListBox.test.js)"
27
+ },
28
+ {
29
+ "reason": "grid geometry tests that mock getBoundingClientRect per option and rely on measured columns/rows beyond a plain 2-D grid layout (react-aria-components ListBox.test.js)"
30
+ },
31
+ {
32
+ "reason": "warnings: missing aria-label console warning; item id must not override the React key (@adobe ListBox.test.js)"
33
+ }
34
+ ],
35
+ "scenarios": [
36
+ {
37
+ "id": "listbox.react-aria.vertical-arrow-navigation",
38
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L180",
39
+ "upstreamTest": "allows user to change listbox focus via up/down arrow keys",
40
+ "apg": "keyboard",
41
+ "config": {
42
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
43
+ "selectionMode": "single",
44
+ "autoFocus": "first"
45
+ },
46
+ "steps": [
47
+ { "expect": { "focus": "option:0" } },
48
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
49
+ { "expect": { "focus": "option:1" } },
50
+ { "event": "key", "key": "ArrowUp", "target": "option:1" },
51
+ { "expect": { "focus": "option:0" } }
52
+ ]
53
+ },
54
+ {
55
+ "id": "listbox.react-aria.focus-wrap-arrows",
56
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L193",
57
+ "upstreamTest": "wraps focus from first to last and last to first when shouldFocusWrap is true",
58
+ "apg": "keyboard",
59
+ "config": {
60
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
61
+ "selectionMode": "single",
62
+ "autoFocus": "first",
63
+ "shouldFocusWrap": true
64
+ },
65
+ "steps": [
66
+ { "expect": { "focus": "option:0" } },
67
+ { "event": "key", "key": "ArrowUp", "target": "option:0" },
68
+ { "expect": { "focus": "option:6" } },
69
+ { "event": "key", "key": "ArrowDown", "target": "option:6" },
70
+ { "expect": { "focus": "option:0" } }
71
+ ]
72
+ },
73
+ {
74
+ "id": "listbox.react-aria.horizontal-arrow-navigation",
75
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1037",
76
+ "upstreamTest": "should support horizontal orientation",
77
+ "apg": "keyboard",
78
+ "config": { "items": 3, "orientation": "horizontal" },
79
+ "steps": [
80
+ { "event": "focus", "target": "option:0" },
81
+ { "expect": { "focus": "option:0" } },
82
+ { "event": "key", "key": "ArrowRight", "target": "option:0" },
83
+ { "expect": { "focus": "option:1" } },
84
+ { "event": "key", "key": "ArrowRight", "target": "option:1" },
85
+ { "expect": { "focus": "option:2" } },
86
+ { "event": "key", "key": "ArrowLeft", "target": "option:2" },
87
+ { "expect": { "focus": "option:1" } }
88
+ ]
89
+ },
90
+ {
91
+ "id": "listbox.react-aria.arrow-skips-disabled-item",
92
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L681",
93
+ "upstreamTest": "should support isDisabled prop on items",
94
+ "apg": "keyboard",
95
+ "config": {
96
+ "items": ["Cat", "Dog", "Kangaroo"],
97
+ "disabledKeys": ["dog"]
98
+ },
99
+ "steps": [
100
+ { "event": "focus", "target": "option:0" },
101
+ { "expect": { "focus": "option:0" } },
102
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
103
+ { "expect": { "focus": "option:2" } }
104
+ ]
105
+ },
106
+ {
107
+ "id": "listbox.react-aria.grid-arrow-navigation",
108
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1054",
109
+ "upstreamTest": "should support grid layout",
110
+ "apg": "extension",
111
+ "config": {
112
+ "items": 3,
113
+ "layout": "grid",
114
+ "orientation": "vertical",
115
+ "columns": 2
116
+ },
117
+ "steps": [
118
+ { "event": "focus", "target": "option:0" },
119
+ { "expect": { "focus": "option:0" } },
120
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
121
+ { "expect": { "focus": "option:2" } },
122
+ { "event": "key", "key": "ArrowLeft", "target": "option:2" },
123
+ { "expect": { "focus": "option:1" } },
124
+ { "event": "key", "key": "ArrowLeft", "target": "option:1" },
125
+ { "expect": { "focus": "option:0" } },
126
+ { "event": "key", "key": "ArrowRight", "target": "option:0" },
127
+ { "expect": { "focus": "option:1" } }
128
+ ],
129
+ "notes": "Grid layout is a react-aria extension, not part of the APG listbox pattern."
130
+ },
131
+ {
132
+ "id": "listbox.react-aria.vertical-grid-boundaries",
133
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1090",
134
+ "upstreamTest": "should not throw TypeError at boundaries of vertical grid layout when keyboard navigating",
135
+ "apg": "extension",
136
+ "config": {
137
+ "items": 9,
138
+ "layout": "grid",
139
+ "orientation": "vertical",
140
+ "columns": 3
141
+ },
142
+ "steps": [
143
+ { "event": "focus", "target": "option:0" },
144
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
145
+ { "expect": { "focus": "option:3" } },
146
+ { "event": "key", "key": "ArrowDown", "target": "option:3" },
147
+ { "expect": { "focus": "option:6" } },
148
+ { "event": "key", "key": "ArrowDown", "target": "option:6" },
149
+ { "expect": { "focus": "option:6" } },
150
+ { "event": "key", "key": "ArrowUp", "target": "option:6" },
151
+ { "expect": { "focus": "option:3" } },
152
+ { "event": "key", "key": "ArrowUp", "target": "option:3" },
153
+ { "expect": { "focus": "option:0" } },
154
+ { "event": "key", "key": "ArrowUp", "target": "option:0" },
155
+ { "expect": { "focus": "option:0" } }
156
+ ],
157
+ "notes": "Grid layout is a react-aria extension; focus clamps at the grid boundary instead of throwing."
158
+ },
159
+ {
160
+ "id": "listbox.react-aria.horizontal-grid-boundaries",
161
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1189",
162
+ "upstreamTest": "should not throw TypeError at boundaries of horizontal grid layout when keyboard navigating",
163
+ "apg": "extension",
164
+ "config": {
165
+ "items": 9,
166
+ "layout": "grid",
167
+ "orientation": "horizontal",
168
+ "rows": 3
169
+ },
170
+ "steps": [
171
+ { "event": "focus", "target": "option:0" },
172
+ { "event": "key", "key": "ArrowRight", "target": "option:0" },
173
+ { "expect": { "focus": "option:3" } },
174
+ { "event": "key", "key": "ArrowRight", "target": "option:3" },
175
+ { "expect": { "focus": "option:6" } },
176
+ { "event": "key", "key": "ArrowRight", "target": "option:6" },
177
+ { "expect": { "focus": "option:6" } },
178
+ { "event": "key", "key": "ArrowLeft", "target": "option:6" },
179
+ { "expect": { "focus": "option:3" } },
180
+ { "event": "key", "key": "ArrowLeft", "target": "option:3" },
181
+ { "expect": { "focus": "option:0" } },
182
+ { "event": "key", "key": "ArrowLeft", "target": "option:0" },
183
+ { "expect": { "focus": "option:0" } }
184
+ ],
185
+ "notes": "Grid layout is a react-aria extension; focus clamps at the grid boundary instead of throwing."
186
+ },
187
+ {
188
+ "id": "listbox.react-aria.modifier-unsupported-mac",
189
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2511",
190
+ "upstreamTest": "should not navigate when using unsupported modifier keys (mac)",
191
+ "apg": "keyboard",
192
+ "config": { "items": 3, "selectionMode": "none", "platform": "mac" },
193
+ "steps": [
194
+ { "event": "focus", "target": "option:0" },
195
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
196
+ { "expect": { "focus": "option:1" } },
197
+ {
198
+ "event": "key",
199
+ "key": "ArrowDown",
200
+ "target": "option:1",
201
+ "modifiers": ["Meta"]
202
+ },
203
+ { "expect": { "focus": "option:1" } },
204
+ {
205
+ "event": "key",
206
+ "key": "ArrowUp",
207
+ "target": "option:1",
208
+ "modifiers": ["Meta"]
209
+ },
210
+ { "expect": { "focus": "option:1" } },
211
+ {
212
+ "event": "key",
213
+ "key": "Home",
214
+ "target": "option:1",
215
+ "modifiers": ["Control"]
216
+ },
217
+ { "expect": { "focus": "option:1" } }
218
+ ]
219
+ },
220
+ {
221
+ "id": "listbox.react-aria.modifier-unsupported-windows",
222
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2617",
223
+ "upstreamTest": "should not navigate when using unsupported modifier keys (windows)",
224
+ "apg": "keyboard",
225
+ "config": { "items": 3, "selectionMode": "none", "platform": "windows" },
226
+ "steps": [
227
+ { "event": "focus", "target": "option:0" },
228
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
229
+ { "expect": { "focus": "option:1" } },
230
+ {
231
+ "event": "key",
232
+ "key": "ArrowDown",
233
+ "target": "option:1",
234
+ "modifiers": ["Meta"]
235
+ },
236
+ { "expect": { "focus": "option:1" } }
237
+ ]
238
+ },
239
+ {
240
+ "id": "listbox.react-aria.single-selection-space",
241
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L280",
242
+ "upstreamTest": "supports using space key to change item selection",
243
+ "apg": "selection",
244
+ "config": {
245
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
246
+ "selectionMode": "single"
247
+ },
248
+ "steps": [
249
+ { "event": "focus", "target": "option:4" },
250
+ { "event": "key", "key": "Space", "target": "option:4" },
251
+ {
252
+ "expect": {
253
+ "attrs": { "option:4": { "aria-selected": "true" } },
254
+ "events": { "onSelectionChange": ["Bleh"] }
255
+ }
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "id": "listbox.react-aria.single-selection-click",
261
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L304",
262
+ "upstreamTest": "supports using click to change item selection",
263
+ "apg": "selection",
264
+ "config": {
265
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
266
+ "selectionMode": "single"
267
+ },
268
+ "steps": [
269
+ { "event": "click", "target": "option:4" },
270
+ {
271
+ "expect": {
272
+ "attrs": { "option:4": { "aria-selected": "true" } },
273
+ "events": { "onSelectionChange": ["Bleh"] }
274
+ }
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "id": "listbox.react-aria.disabled-item-not-selectable",
280
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L326",
281
+ "upstreamTest": "supports disabled items",
282
+ "apg": "selection",
283
+ "config": {
284
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
285
+ "selectionMode": "single",
286
+ "disabledKeys": ["Baz"],
287
+ "autoFocus": "first"
288
+ },
289
+ "steps": [
290
+ { "event": "click", "target": "option:2" },
291
+ {
292
+ "expect": {
293
+ "attrs": {
294
+ "option:2": { "aria-selected": "false", "aria-disabled": "true" }
295
+ },
296
+ "events": {}
297
+ }
298
+ }
299
+ ],
300
+ "notes": "onSelectionChange is not called; keyboard navigation around disabled items is covered by listbox.react-aria.arrow-skips-disabled-item."
301
+ },
302
+ {
303
+ "id": "listbox.react-aria.multiple-select",
304
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L363",
305
+ "upstreamTest": "supports selecting multiple items",
306
+ "apg": "selection",
307
+ "config": {
308
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
309
+ "selectionMode": "multiple"
310
+ },
311
+ "steps": [
312
+ {
313
+ "expect": {
314
+ "attrs": { "listbox": { "aria-multiselectable": "true" } }
315
+ }
316
+ },
317
+ { "event": "click", "target": "option:3" },
318
+ {
319
+ "expect": {
320
+ "attrs": { "option:3": { "aria-selected": "true" } },
321
+ "events": { "onSelectionChange": ["Blah"] }
322
+ }
323
+ },
324
+ { "event": "click", "target": "option:1" },
325
+ {
326
+ "expect": {
327
+ "attrs": {
328
+ "option:3": { "aria-selected": "true" },
329
+ "option:1": { "aria-selected": "true" }
330
+ },
331
+ "events": { "onSelectionChange": ["Bar", "Blah"] }
332
+ }
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "id": "listbox.react-aria.multiple-deselect",
338
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L487",
339
+ "upstreamTest": "supports deselection",
340
+ "apg": "selection",
341
+ "config": {
342
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
343
+ "selectionMode": "multiple",
344
+ "defaultSelectedKeys": ["Foo", "Bar"]
345
+ },
346
+ "steps": [
347
+ {
348
+ "expect": {
349
+ "attrs": {
350
+ "option:0": { "aria-selected": "true" },
351
+ "option:1": { "aria-selected": "true" }
352
+ }
353
+ }
354
+ },
355
+ { "event": "click", "target": "option:0" },
356
+ {
357
+ "expect": {
358
+ "attrs": {
359
+ "option:0": { "aria-selected": "false" },
360
+ "option:1": { "aria-selected": "true" }
361
+ },
362
+ "events": { "onSelectionChange": ["Bar"] }
363
+ }
364
+ }
365
+ ]
366
+ },
367
+ {
368
+ "id": "listbox.react-aria.none-mode-prevents-selection",
369
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L585",
370
+ "upstreamTest": "prevents selection of any items",
371
+ "apg": "selection",
372
+ "config": {
373
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
374
+ "selectionMode": "none"
375
+ },
376
+ "steps": [
377
+ { "event": "click", "target": "option:3" },
378
+ {
379
+ "expect": {
380
+ "attrs": { "option:3": { "aria-selected": "false" } },
381
+ "events": {}
382
+ }
383
+ },
384
+ { "event": "key", "key": "Space", "target": "option:4" },
385
+ {
386
+ "expect": {
387
+ "attrs": { "option:4": { "aria-selected": "false" } },
388
+ "events": {}
389
+ }
390
+ },
391
+ { "event": "key", "key": "Enter", "target": "option:1" },
392
+ {
393
+ "expect": {
394
+ "attrs": { "option:1": { "aria-selected": "false" } },
395
+ "events": {}
396
+ }
397
+ }
398
+ ]
399
+ },
400
+ {
401
+ "id": "listbox.react-aria.replace-selection-pointer",
402
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L755",
403
+ "upstreamTest": "should perform selection with single selection (selectionBehavior replace, mouse)",
404
+ "apg": "selection",
405
+ "config": {
406
+ "items": ["Cat", "Dog", "Kangaroo"],
407
+ "selectionMode": "single",
408
+ "selectionBehavior": "replace"
409
+ },
410
+ "steps": [
411
+ { "event": "click", "target": "option:2" },
412
+ {
413
+ "expect": {
414
+ "attrs": { "option:2": { "aria-selected": "true" } },
415
+ "events": { "onSelectionChange": ["kangaroo"] }
416
+ }
417
+ },
418
+ { "event": "click", "target": "option:1" },
419
+ {
420
+ "expect": {
421
+ "attrs": {
422
+ "option:1": { "aria-selected": "true" },
423
+ "option:2": { "aria-selected": "false" }
424
+ },
425
+ "events": { "onSelectionChange": ["dog"] }
426
+ }
427
+ },
428
+ { "event": "click", "target": "option:1" },
429
+ {
430
+ "expect": {
431
+ "attrs": {
432
+ "option:1": { "aria-selected": "false" },
433
+ "option:2": { "aria-selected": "false" }
434
+ },
435
+ "events": { "onSelectionChange": [] }
436
+ }
437
+ }
438
+ ],
439
+ "notes": "Mouse/touch variant. With a keyboard interaction the initial focus selects the first row, so onSelectionChange fires an extra time; that is not restated here."
440
+ },
441
+ {
442
+ "id": "listbox.react-aria.arrow-replaces-selection-mac",
443
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2527",
444
+ "upstreamTest": "replaces selection as focus moves with arrow keys (mac)",
445
+ "apg": "selection",
446
+ "config": {
447
+ "items": ["Cat", "Dog", "Kangaroo"],
448
+ "selectionMode": "multiple",
449
+ "selectionBehavior": "replace",
450
+ "platform": "mac"
451
+ },
452
+ "steps": [
453
+ { "event": "focus", "target": "option:0" },
454
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
455
+ {
456
+ "expect": {
457
+ "focus": "option:1",
458
+ "events": { "onSelectionChange": ["dog"] }
459
+ }
460
+ }
461
+ ]
462
+ },
463
+ {
464
+ "id": "listbox.react-aria.alt-arrow-navigates-without-selecting",
465
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2541",
466
+ "upstreamTest": "navigates focus without changing selection when Alt is held",
467
+ "apg": "keyboard",
468
+ "config": {
469
+ "items": ["Cat", "Dog", "Kangaroo"],
470
+ "selectionMode": "multiple",
471
+ "selectionBehavior": "replace"
472
+ },
473
+ "steps": [
474
+ { "event": "focus", "target": "option:0" },
475
+ {
476
+ "event": "key",
477
+ "key": "ArrowDown",
478
+ "target": "option:0",
479
+ "modifiers": ["Alt"]
480
+ },
481
+ { "expect": { "focus": "option:1", "events": {} } }
482
+ ]
483
+ },
484
+ {
485
+ "id": "listbox.react-aria.shift-arrow-extends-selection",
486
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2556",
487
+ "upstreamTest": "extends selection when Shift is held",
488
+ "apg": "selection",
489
+ "config": {
490
+ "items": ["Cat", "Dog", "Kangaroo"],
491
+ "selectionMode": "multiple",
492
+ "selectionBehavior": "replace"
493
+ },
494
+ "steps": [
495
+ { "event": "focus", "target": "option:0" },
496
+ {
497
+ "event": "key",
498
+ "key": "ArrowDown",
499
+ "target": "option:0",
500
+ "modifiers": ["Shift"]
501
+ },
502
+ {
503
+ "expect": {
504
+ "focus": "option:1",
505
+ "events": { "onSelectionChange": ["cat", "dog"] }
506
+ }
507
+ }
508
+ ]
509
+ },
510
+ {
511
+ "id": "listbox.react-aria.home-end-replace-selection",
512
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2572",
513
+ "upstreamTest": "replaces selection with Home and End",
514
+ "apg": "keyboard",
515
+ "config": {
516
+ "items": ["Cat", "Dog", "Kangaroo"],
517
+ "selectionMode": "multiple",
518
+ "selectionBehavior": "replace"
519
+ },
520
+ "steps": [
521
+ { "event": "focus", "target": "option:0" },
522
+ { "event": "key", "key": "End", "target": "option:0" },
523
+ {
524
+ "expect": {
525
+ "focus": "option:2",
526
+ "events": { "onSelectionChange": ["kangaroo"] }
527
+ }
528
+ },
529
+ { "event": "key", "key": "Home", "target": "option:2" },
530
+ {
531
+ "expect": {
532
+ "focus": "option:0",
533
+ "events": { "onSelectionChange": ["cat"] }
534
+ }
535
+ }
536
+ ]
537
+ },
538
+ {
539
+ "id": "listbox.react-aria.mod-a-selects-all-mac",
540
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2592",
541
+ "upstreamTest": "selects all with Mod+A (Meta) in multiple selection mode",
542
+ "apg": "selection",
543
+ "config": {
544
+ "items": ["Cat", "Dog", "Kangaroo"],
545
+ "selectionMode": "multiple",
546
+ "platform": "mac"
547
+ },
548
+ "steps": [
549
+ { "event": "focus", "target": "option:0" },
550
+ {
551
+ "event": "key",
552
+ "key": "a",
553
+ "target": "listbox",
554
+ "modifiers": ["Meta"]
555
+ },
556
+ { "expect": { "events": { "onSelectionChange": ["all"] } } }
557
+ ]
558
+ },
559
+ {
560
+ "id": "listbox.react-aria.mod-a-noop-single-mac",
561
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2600",
562
+ "upstreamTest": "does not select all with Mod+A when selection mode is single",
563
+ "apg": "selection",
564
+ "config": {
565
+ "items": ["Cat", "Dog", "Kangaroo"],
566
+ "selectionMode": "single",
567
+ "platform": "mac"
568
+ },
569
+ "steps": [
570
+ { "event": "focus", "target": "option:0" },
571
+ {
572
+ "event": "key",
573
+ "key": "a",
574
+ "target": "listbox",
575
+ "modifiers": ["Meta"]
576
+ },
577
+ { "expect": { "events": {} } }
578
+ ]
579
+ },
580
+ {
581
+ "id": "listbox.react-aria.control-a-selects-all-windows",
582
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2660",
583
+ "upstreamTest": "selects all with Mod+A (Control) in multiple selection mode (windows)",
584
+ "apg": "selection",
585
+ "config": {
586
+ "items": ["Cat", "Dog", "Kangaroo"],
587
+ "selectionMode": "multiple",
588
+ "platform": "windows"
589
+ },
590
+ "steps": [
591
+ { "event": "focus", "target": "option:0" },
592
+ {
593
+ "event": "key",
594
+ "key": "a",
595
+ "target": "listbox",
596
+ "modifiers": ["Control"]
597
+ },
598
+ { "expect": { "events": { "onSelectionChange": ["all"] } } }
599
+ ]
600
+ },
601
+ {
602
+ "id": "listbox.react-aria.control-arrow-navigates-windows",
603
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2627",
604
+ "upstreamTest": "navigates focus when Control is held (non-contiguous)",
605
+ "apg": "keyboard",
606
+ "config": {
607
+ "items": ["Cat", "Dog", "Kangaroo"],
608
+ "selectionMode": "multiple",
609
+ "platform": "windows"
610
+ },
611
+ "steps": [
612
+ { "event": "focus", "target": "option:0" },
613
+ {
614
+ "event": "key",
615
+ "key": "ArrowDown",
616
+ "target": "option:0",
617
+ "modifiers": ["Control"]
618
+ },
619
+ { "expect": { "focus": "option:1", "events": {} } }
620
+ ]
621
+ },
622
+ {
623
+ "id": "listbox.react-aria.control-shift-home-end-extends",
624
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2638",
625
+ "upstreamTest": "extends selection with Control+Shift+End and Control+Shift+Home",
626
+ "apg": "selection",
627
+ "config": {
628
+ "items": ["Cat", "Dog", "Kangaroo"],
629
+ "selectionMode": "multiple",
630
+ "defaultSelectedKeys": ["cat"],
631
+ "platform": "windows"
632
+ },
633
+ "steps": [
634
+ { "event": "focus", "target": "option:0" },
635
+ {
636
+ "event": "key",
637
+ "key": "End",
638
+ "target": "option:0",
639
+ "modifiers": ["Control", "Shift"]
640
+ },
641
+ {
642
+ "expect": {
643
+ "focus": "option:2",
644
+ "events": { "onSelectionChange": ["cat", "kangaroo"] }
645
+ }
646
+ },
647
+ {
648
+ "event": "key",
649
+ "key": "Home",
650
+ "target": "option:2",
651
+ "modifiers": ["Control", "Shift"]
652
+ },
653
+ {
654
+ "expect": {
655
+ "focus": "option:0",
656
+ "events": { "onSelectionChange": ["cat", "dog", "kangaroo"] }
657
+ }
658
+ }
659
+ ]
660
+ },
661
+ {
662
+ "id": "listbox.react-aria.falsy-keys-shift-extend",
663
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1944",
664
+ "upstreamTest": "should deselect item 0 when navigating back in replace selection mode",
665
+ "apg": "selection",
666
+ "config": {
667
+ "items": ["Item 0", "Item 1", "Item 2"],
668
+ "selectionMode": "multiple",
669
+ "selectionBehavior": "replace"
670
+ },
671
+ "steps": [
672
+ { "event": "click", "target": "option:1" },
673
+ { "expect": { "attrs": { "option:1": { "aria-selected": "true" } } } },
674
+ {
675
+ "event": "key",
676
+ "key": "ArrowUp",
677
+ "target": "option:1",
678
+ "modifiers": ["Shift"]
679
+ },
680
+ {
681
+ "expect": {
682
+ "attrs": {
683
+ "option:0": { "aria-selected": "true" },
684
+ "option:1": { "aria-selected": "true" },
685
+ "option:2": { "aria-selected": "false" }
686
+ }
687
+ }
688
+ },
689
+ {
690
+ "event": "key",
691
+ "key": "ArrowDown",
692
+ "target": "option:0",
693
+ "modifiers": ["Shift"]
694
+ },
695
+ {
696
+ "expect": {
697
+ "attrs": {
698
+ "option:0": { "aria-selected": "false" },
699
+ "option:1": { "aria-selected": "true" },
700
+ "option:2": { "aria-selected": "false" }
701
+ }
702
+ }
703
+ }
704
+ ],
705
+ "notes": "Regression for falsy key 0: the item with key 0 must stay selectable and deselectable."
706
+ },
707
+ {
708
+ "id": "listbox.react-aria.select-on-press-default",
709
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2025",
710
+ "upstreamTest": "should select an item on pressing down when shouldSelectOnPressUp is not provided",
711
+ "apg": "pointer",
712
+ "config": {
713
+ "items": ["Cat", "Dog", "Kangaroo"],
714
+ "selectionMode": "single"
715
+ },
716
+ "steps": [
717
+ { "event": "pointerdown", "target": "option:0" },
718
+ { "expect": { "events": { "onSelectionChange": ["cat"] } } },
719
+ { "event": "pointerup", "target": "option:0" },
720
+ { "expect": { "events": { "onSelectionChange": ["cat"] } } }
721
+ ]
722
+ },
723
+ {
724
+ "id": "listbox.react-aria.select-on-press-down-when-false",
725
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2037",
726
+ "upstreamTest": "should select an item on pressing down when shouldSelectOnPressUp is false",
727
+ "apg": "pointer",
728
+ "config": {
729
+ "items": ["Cat", "Dog", "Kangaroo"],
730
+ "selectionMode": "single",
731
+ "shouldSelectOnPressUp": false
732
+ },
733
+ "steps": [
734
+ { "event": "pointerdown", "target": "option:0" },
735
+ { "expect": { "events": { "onSelectionChange": ["cat"] } } },
736
+ { "event": "pointerup", "target": "option:0" },
737
+ { "expect": { "events": { "onSelectionChange": ["cat"] } } }
738
+ ]
739
+ },
740
+ {
741
+ "id": "listbox.react-aria.select-on-press-up-true",
742
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2053",
743
+ "upstreamTest": "should select an item on pressing up when shouldSelectOnPressUp is true",
744
+ "apg": "pointer",
745
+ "config": {
746
+ "items": ["Cat", "Dog", "Kangaroo"],
747
+ "selectionMode": "single",
748
+ "shouldSelectOnPressUp": true
749
+ },
750
+ "steps": [
751
+ { "event": "pointerdown", "target": "option:0" },
752
+ { "expect": { "events": {} } },
753
+ { "event": "pointerup", "target": "option:0" },
754
+ { "expect": { "events": { "onSelectionChange": ["cat"] } } }
755
+ ]
756
+ },
757
+ {
758
+ "id": "listbox.react-aria.focus-on-hover",
759
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2071",
760
+ "upstreamTest": "should focus options on hovering with shouldFocusOnHover",
761
+ "apg": "focus",
762
+ "config": {
763
+ "items": ["Cat", "Dog", "Kangaroo"],
764
+ "shouldFocusOnHover": true
765
+ },
766
+ "steps": [
767
+ { "expect": { "focus": null } },
768
+ { "event": "hover", "target": "option:0" },
769
+ { "expect": { "focus": "option:0" } },
770
+ { "event": "key", "key": "ArrowDown", "target": "option:0" },
771
+ { "expect": { "focus": "option:1" } }
772
+ ]
773
+ },
774
+ {
775
+ "id": "listbox.react-aria.no-focus-on-hover",
776
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2088",
777
+ "upstreamTest": "should not focus options on hovering when shouldFocusOnHover is not true",
778
+ "apg": "focus",
779
+ "config": {
780
+ "items": ["Cat", "Dog", "Kangaroo"],
781
+ "shouldFocusOnHover": false
782
+ },
783
+ "steps": [
784
+ { "expect": { "focus": null } },
785
+ { "event": "hover", "target": "option:0" },
786
+ { "expect": { "focus": null } }
787
+ ]
788
+ },
789
+ {
790
+ "id": "listbox.react-aria.auto-focus-listbox",
791
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L514",
792
+ "upstreamTest": "should support autoFocus",
793
+ "apg": "focus",
794
+ "config": { "items": ["Cat", "Dog", "Kangaroo"], "autoFocus": true },
795
+ "steps": [{ "expect": { "focus": "listbox" } }]
796
+ },
797
+ {
798
+ "id": "listbox.react-aria.typeahead-rapid-letters",
799
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L615",
800
+ "upstreamTest": "supports focusing items by typing letters in rapid succession",
801
+ "apg": "keyboard",
802
+ "config": {
803
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
804
+ "autoFocus": "first"
805
+ },
806
+ "steps": [
807
+ { "expect": { "focus": "option:0" } },
808
+ { "event": "type", "text": "B", "target": "listbox" },
809
+ { "expect": { "focus": "option:1" } },
810
+ { "event": "type", "text": "L", "target": "listbox" },
811
+ { "expect": { "focus": "option:3" } },
812
+ { "event": "type", "text": "E", "target": "listbox" },
813
+ { "expect": { "focus": "option:4" } }
814
+ ]
815
+ },
816
+ {
817
+ "id": "listbox.react-aria.typeahead-space-in-search",
818
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L631",
819
+ "upstreamTest": "supports the space character in a search",
820
+ "apg": "keyboard",
821
+ "config": {
822
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
823
+ "autoFocus": "first"
824
+ },
825
+ "steps": [
826
+ { "event": "type", "text": "F", "target": "listbox" },
827
+ { "event": "type", "text": "O", "target": "listbox" },
828
+ { "event": "type", "text": "O", "target": "listbox" },
829
+ { "expect": { "focus": "option:0" } },
830
+ { "event": "type", "text": " ", "target": "listbox" },
831
+ { "expect": { "focus": "option:5" } },
832
+ { "event": "type", "text": "B", "target": "listbox" },
833
+ { "event": "type", "text": "A", "target": "listbox" },
834
+ { "expect": { "focus": "option:5" } },
835
+ { "event": "type", "text": "Z", "target": "listbox" },
836
+ { "expect": { "focus": "option:6" } }
837
+ ]
838
+ },
839
+ {
840
+ "id": "listbox.react-aria.typeahead-space-after-timeout-selects",
841
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L659",
842
+ "upstreamTest": "supports item selection using the Spacebar after search times out",
843
+ "apg": "selection",
844
+ "config": {
845
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
846
+ "selectionMode": "single",
847
+ "autoFocus": "first"
848
+ },
849
+ "steps": [
850
+ { "event": "type", "text": "F", "target": "listbox" },
851
+ { "event": "type", "text": "O", "target": "listbox" },
852
+ { "event": "type", "text": "O", "target": "listbox" },
853
+ { "event": "type", "text": " ", "target": "listbox" },
854
+ {
855
+ "expect": {
856
+ "focus": "option:5",
857
+ "attrs": { "option:5": { "aria-selected": "false" } },
858
+ "events": {}
859
+ }
860
+ },
861
+ { "event": "type", "text": "B", "target": "listbox" },
862
+ { "expect": { "focus": "option:5" } },
863
+ { "event": "prop", "prop": "typeaheadTimeoutElapsed", "value": true },
864
+ { "event": "key", "key": "Space", "target": "option:5" },
865
+ {
866
+ "expect": {
867
+ "attrs": { "option:5": { "aria-selected": "true" } },
868
+ "events": { "onSelectionChange": ["Foo Bar"] }
869
+ }
870
+ }
871
+ ],
872
+ "notes": "A space typed while a typeahead buffer is active is treated as search text; only after the buffer timeout is Space a selection key. typeaheadTimeoutElapsed stands in for advancing the typeahead timer."
873
+ },
874
+ {
875
+ "id": "listbox.react-aria.typeahead-reset-after-timeout",
876
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L716",
877
+ "upstreamTest": "resets the search text after a timeout",
878
+ "apg": "keyboard",
879
+ "config": {
880
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
881
+ "autoFocus": "first"
882
+ },
883
+ "steps": [
884
+ { "event": "type", "text": "B", "target": "listbox" },
885
+ { "expect": { "focus": "option:1" } },
886
+ { "event": "prop", "prop": "typeaheadTimeoutElapsed", "value": true },
887
+ { "event": "type", "text": "B", "target": "listbox" },
888
+ { "expect": { "focus": "option:1" } }
889
+ ]
890
+ },
891
+ {
892
+ "id": "listbox.react-aria.typeahead-searches-from-current-item",
893
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L733",
894
+ "upstreamTest": "wraps around when no items past the current one match",
895
+ "apg": "keyboard",
896
+ "config": {
897
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
898
+ "autoFocus": "first"
899
+ },
900
+ "steps": [
901
+ { "event": "type", "text": "B", "target": "listbox" },
902
+ { "event": "type", "text": "L", "target": "listbox" },
903
+ { "event": "type", "text": "E", "target": "listbox" },
904
+ { "expect": { "focus": "option:4" } },
905
+ { "event": "prop", "prop": "typeaheadTimeoutElapsed", "value": true },
906
+ { "event": "type", "text": "B", "target": "listbox" },
907
+ { "expect": { "focus": "option:4" } }
908
+ ],
909
+ "notes": "Upstream title says 'wraps around', but the assertion shows the search is inclusive of the current item: focus stays on Bleh because it starts with B."
910
+ },
911
+ {
912
+ "id": "listbox.react-aria.aria-label",
913
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L777",
914
+ "upstreamTest": "supports aria-label",
915
+ "apg": "aria",
916
+ "config": { "items": ["Foo", "Bar", "Baz"], "ariaLabel": "Test" },
917
+ "steps": [
918
+ { "expect": { "attrs": { "listbox": { "aria-label": "Test" } } } }
919
+ ]
920
+ },
921
+ {
922
+ "id": "listbox.react-aria.disabled-option-aria",
923
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L670",
924
+ "upstreamTest": "should support disabled state",
925
+ "apg": "aria",
926
+ "config": {
927
+ "items": ["Cat", "Dog", "Kangaroo"],
928
+ "selectionMode": "multiple",
929
+ "disabledKeys": ["cat"]
930
+ },
931
+ "steps": [
932
+ { "expect": { "attrs": { "option:0": { "aria-disabled": "true" } } } }
933
+ ]
934
+ },
935
+ {
936
+ "id": "listbox.react-aria.on-action-list-and-item",
937
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1006",
938
+ "upstreamTest": "should support onAction on list and list items",
939
+ "apg": "extension",
940
+ "config": { "items": ["Cat", "Dog", "Kangaroo"] },
941
+ "steps": [
942
+ { "event": "click", "target": "option:0" },
943
+ {
944
+ "expect": {
945
+ "events": { "onAction": ["cat"], "onItemAction": ["cat"] }
946
+ }
947
+ }
948
+ ],
949
+ "notes": "onAction is a react-aria callback, not an APG listbox requirement."
950
+ },
951
+ {
952
+ "id": "listbox.react-aria.on-action-double-click-replace",
953
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L724",
954
+ "upstreamTest": "should trigger onAction on double click if selectionBehavior=replace",
955
+ "apg": "extension",
956
+ "config": {
957
+ "items": ["Cat", "Dog", "Kangaroo"],
958
+ "selectionMode": "multiple",
959
+ "selectionBehavior": "replace"
960
+ },
961
+ "steps": [
962
+ { "event": "click", "target": "option:0" },
963
+ {
964
+ "expect": {
965
+ "attrs": { "option:0": { "aria-selected": "true" } },
966
+ "events": {}
967
+ }
968
+ },
969
+ { "event": "click", "target": "option:1", "count": 2 },
970
+ {
971
+ "expect": {
972
+ "attrs": {
973
+ "option:1": { "aria-selected": "true" },
974
+ "option:0": { "aria-selected": "false" }
975
+ },
976
+ "events": { "onAction": ["dog"] }
977
+ }
978
+ }
979
+ ],
980
+ "notes": "A single press selects, a double press runs onAction; onAction is a react-aria extension."
981
+ },
982
+ {
983
+ "id": "listbox.react-aria.press-events",
984
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L2316",
985
+ "upstreamTest": "should support press events on items",
986
+ "apg": "extension",
987
+ "config": { "items": ["Cat", "Dog", "Kangaroo"] },
988
+ "steps": [
989
+ { "event": "click", "target": "option:1" },
990
+ {
991
+ "expect": {
992
+ "events": {
993
+ "onAction": ["dog"],
994
+ "onPressStart": ["dog"],
995
+ "onPressEnd": ["dog"],
996
+ "onPress": ["dog"],
997
+ "onClick": ["dog"]
998
+ }
999
+ }
1000
+ }
1001
+ ],
1002
+ "notes": "Press callbacks are a react-aria extension; the observable listbox effect is only the activation of option:1."
1003
+ },
1004
+ {
1005
+ "id": "listbox.react-aria.single-default-selection-enter",
1006
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L207",
1007
+ "upstreamTest": "supports defaultSelectedKeys (uncontrolled)",
1008
+ "apg": "selection",
1009
+ "config": {
1010
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
1011
+ "selectionMode": "single",
1012
+ "defaultSelectedKeys": ["Blah"],
1013
+ "autoFocus": "first"
1014
+ },
1015
+ "steps": [
1016
+ {
1017
+ "expect": {
1018
+ "attrs": { "option:3": { "aria-selected": "true" } },
1019
+ "focus": "option:3"
1020
+ }
1021
+ },
1022
+ { "event": "key", "key": "Enter", "target": "option:4" },
1023
+ {
1024
+ "expect": {
1025
+ "attrs": {
1026
+ "option:4": { "aria-selected": "true" },
1027
+ "option:3": { "aria-selected": "false" }
1028
+ },
1029
+ "events": { "onSelectionChange": ["Bleh"] }
1030
+ }
1031
+ }
1032
+ ]
1033
+ },
1034
+ {
1035
+ "id": "listbox.react-aria.multiple-default-selection-click",
1036
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L397",
1037
+ "upstreamTest": "supports multiple defaultSelectedKeys (uncontrolled)",
1038
+ "apg": "selection",
1039
+ "config": {
1040
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
1041
+ "selectionMode": "multiple",
1042
+ "defaultSelectedKeys": ["Foo", "Bar"]
1043
+ },
1044
+ "steps": [
1045
+ {
1046
+ "expect": {
1047
+ "attrs": {
1048
+ "option:0": { "aria-selected": "true" },
1049
+ "option:1": { "aria-selected": "true" }
1050
+ }
1051
+ }
1052
+ },
1053
+ { "event": "click", "target": "option:4" },
1054
+ {
1055
+ "expect": {
1056
+ "attrs": { "option:4": { "aria-selected": "true" } },
1057
+ "events": { "onSelectionChange": ["Foo", "Bar", "Bleh"] }
1058
+ }
1059
+ }
1060
+ ]
1061
+ },
1062
+ {
1063
+ "id": "listbox.react-aria.escape-none-retains-selection",
1064
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/react-aria-components/test/ListBox.test.js#L1389",
1065
+ "upstreamTest": "should prevent Esc from clearing selection if escapeKeyBehavior is none",
1066
+ "apg": "keyboard",
1067
+ "config": {
1068
+ "items": ["Cat", "Dog", "Kangaroo"],
1069
+ "selectionMode": "multiple",
1070
+ "escapeKeyBehavior": "none"
1071
+ },
1072
+ "steps": [
1073
+ { "event": "click", "target": "option:0" },
1074
+ { "expect": { "attrs": { "option:0": { "aria-selected": "true" } } } },
1075
+ { "event": "key", "key": "Escape", "target": "option:0" },
1076
+ {
1077
+ "expect": {
1078
+ "attrs": { "option:0": { "aria-selected": "true" } },
1079
+ "events": { "onSelectionChange": ["cat"] }
1080
+ }
1081
+ }
1082
+ ]
1083
+ },
1084
+ {
1085
+ "id": "listbox.react-aria.escape-none-retains-multi",
1086
+ "upstream": "https://github.com/adobe/react-spectrum/blob/99e610236887da619ad9d54a1cd87983166c043d/packages/@adobe/react-spectrum/test/listbox/ListBox.test.js#L556",
1087
+ "upstreamTest": "should prevent Esc from clearing selection if escapeKeyBehavior is none (multiple)",
1088
+ "apg": "keyboard",
1089
+ "config": {
1090
+ "items": ["Foo", "Bar", "Baz", "Blah", "Bleh", "Foo Bar", "Foo Baz"],
1091
+ "selectionMode": "multiple",
1092
+ "escapeKeyBehavior": "none"
1093
+ },
1094
+ "steps": [
1095
+ { "event": "click", "target": "option:3" },
1096
+ { "event": "click", "target": "option:1" },
1097
+ {
1098
+ "expect": {
1099
+ "attrs": {
1100
+ "option:3": { "aria-selected": "true" },
1101
+ "option:1": { "aria-selected": "true" }
1102
+ }
1103
+ }
1104
+ },
1105
+ { "event": "key", "key": "Escape", "target": "option:1" },
1106
+ {
1107
+ "expect": {
1108
+ "attrs": {
1109
+ "option:3": { "aria-selected": "true" },
1110
+ "option:1": { "aria-selected": "true" }
1111
+ },
1112
+ "events": { "onSelectionChange": ["Bar", "Blah"] }
1113
+ }
1114
+ }
1115
+ ]
1116
+ }
1117
+ ]
1118
+ }