react-native-a11y-order 0.9.1 → 0.11.0-rc1

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 (305) hide show
  1. package/README.md +55 -334
  2. package/android/src/main/java/com/a11yorder/A11yOrderPackage.java +2 -6
  3. package/android/src/main/java/com/a11yorder/core/A11yManagedFocusView.java +29 -0
  4. package/android/src/main/java/com/a11yorder/{views/A11yView/A11yView.java → core/A11yScreenReaderView.java} +3 -45
  5. package/android/src/main/java/com/a11yorder/core/A11yViewOrder.java +37 -0
  6. package/android/src/main/java/com/a11yorder/modules/A11yAnnounceModule.java +20 -7
  7. package/android/src/main/java/com/a11yorder/views/A11yCardView/A11yCardViewManager.java +18 -0
  8. package/android/src/main/java/com/a11yorder/views/A11yIndexView/A11yIndexView.java +2 -65
  9. package/android/src/main/java/com/a11yorder/views/A11yIndexView/A11yIndexViewManager.java +21 -0
  10. package/android/src/newarch/A11yCardViewManagerSpec.java +9 -0
  11. package/android/src/oldarch/A11yAnnounceModuleSpec.java +8 -1
  12. package/android/src/oldarch/A11yCardViewManagerSpec.java +8 -0
  13. package/android/src/oldarch/A11yIndexViewManagerSpec.java +8 -0
  14. package/ios/helpers/RNAOFabricEventHelper/RNAOFabricEventHelper.mm +5 -5
  15. package/ios/helpers/RNAOSpeechAttributes.h +35 -0
  16. package/ios/helpers/RNAOSpeechAttributes.mm +64 -0
  17. package/ios/modules/RNAOA11yAnnounceModule.h +13 -9
  18. package/ios/modules/RNAOA11yAnnounceModule.mm +220 -14
  19. package/ios/services/RNAOA11yAnnounceService/RNAOA11yAnnounceService.h +11 -1
  20. package/ios/services/RNAOA11yAnnounceService/RNAOA11yAnnounceService.mm +55 -51
  21. package/ios/views/RNAOA11yCardView/RNAOA11yCardView.h +29 -0
  22. package/ios/views/RNAOA11yCardView/RNAOA11yCardView.mm +83 -0
  23. package/ios/views/RNAOA11yCardView/RNAOA11yCardViewManager.h +14 -0
  24. package/ios/views/RNAOA11yCardView/RNAOA11yCardViewManager.mm +17 -0
  25. package/ios/views/RNAOA11yIndexView/RNAOA11yIndexView.h +2 -41
  26. package/ios/views/RNAOA11yIndexView/RNAOA11yIndexView.mm +24 -128
  27. package/ios/views/RNAOA11yIndexView/RNAOA11yIndexViewManager.mm +15 -0
  28. package/ios/views/RNAOA11yPaneTitleView/RNAOA11yPaneTitleView.mm +12 -2
  29. package/ios/views/base/RNAOA11yGroupChildrenView.h +21 -0
  30. package/ios/views/base/RNAOA11yGroupChildrenView.mm +19 -0
  31. package/ios/views/base/RNAOA11yManagedFocusView.h +28 -0
  32. package/ios/views/{RNAOA11yView/RNAOA11yView.mm → base/RNAOA11yManagedFocusView.mm} +64 -183
  33. package/ios/views/base/RNAOA11yScreenReaderView.h +24 -0
  34. package/ios/views/base/RNAOA11yScreenReaderView.mm +32 -0
  35. package/ios/views/base/RNAOA11yViewGroup.h +35 -0
  36. package/ios/views/base/RNAOA11yViewGroup.mm +46 -0
  37. package/ios/views/base/RNAOA11yViewOrder.h +40 -0
  38. package/ios/views/base/RNAOA11yViewOrder.mm +92 -0
  39. package/lib/commonjs/components/A11yCard/A11yCard.ios.js +49 -0
  40. package/lib/commonjs/components/A11yCard/A11yCard.ios.js.map +1 -0
  41. package/lib/commonjs/components/A11yCard/A11yCard.js +41 -0
  42. package/lib/commonjs/components/A11yCard/A11yCard.js.map +1 -0
  43. package/lib/commonjs/{types/A11yGroup.types.js → components/A11yCard/A11yCard.types.js} +1 -1
  44. package/lib/commonjs/components/A11yCard/A11yCard.types.js.map +1 -0
  45. package/lib/commonjs/components/A11yIndex/A11yIndex.js +88 -28
  46. package/lib/commonjs/components/A11yIndex/A11yIndex.js.map +1 -1
  47. package/lib/commonjs/components/A11yIndex/A11yIndex.types.js +39 -0
  48. package/lib/commonjs/components/A11yIndex/A11yIndex.types.js.map +1 -0
  49. package/lib/commonjs/components/A11yIndex/A11yIndex.web.js.map +1 -1
  50. package/lib/commonjs/components/A11yLock/A11yFocusFrame/A11yFocusFrame.js.map +1 -1
  51. package/lib/commonjs/components/A11yLock/A11yFocusTrap/A11yFocusTrap.js.map +1 -1
  52. package/lib/commonjs/components/A11yLock/A11yLock.types.js.map +1 -0
  53. package/lib/commonjs/components/{A11ySequence/A11ySequence.js → A11yOrder/A11yOrder.js} +3 -3
  54. package/lib/commonjs/components/A11yOrder/A11yOrder.js.map +1 -0
  55. package/lib/commonjs/{types/A11yModule.types.js → components/A11yOrder/A11yOrder.types.js} +1 -1
  56. package/lib/commonjs/components/A11yOrder/A11yOrder.types.js.map +1 -0
  57. package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.js +6 -7
  58. package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.js.map +1 -1
  59. package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.types.js +6 -0
  60. package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.types.js.map +1 -0
  61. package/lib/commonjs/components/A11yView/A11yView.js +7 -33
  62. package/lib/commonjs/components/A11yView/A11yView.js.map +1 -1
  63. package/lib/commonjs/components/A11yView/A11yView.types.js.map +1 -0
  64. package/lib/commonjs/index.js +37 -10
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/index.web.js +12 -6
  67. package/lib/commonjs/index.web.js.map +1 -1
  68. package/lib/commonjs/modules/A11yAnnounceModule.android.js +37 -3
  69. package/lib/commonjs/modules/A11yAnnounceModule.android.js.map +1 -1
  70. package/lib/commonjs/modules/A11yAnnounceModule.js +66 -8
  71. package/lib/commonjs/modules/A11yAnnounceModule.js.map +1 -1
  72. package/lib/commonjs/nativeSpecs/{A11yGroupNativeComponent.ts → A11yCardNativeComponent.ts} +3 -3
  73. package/lib/commonjs/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
  74. package/lib/commonjs/nativeSpecs/NativeA11yAnnounceModule.js +2 -0
  75. package/lib/commonjs/nativeSpecs/NativeA11yAnnounceModule.js.map +1 -1
  76. package/lib/module/components/A11yCard/A11yCard.ios.js +43 -0
  77. package/lib/module/components/A11yCard/A11yCard.ios.js.map +1 -0
  78. package/lib/module/components/A11yCard/A11yCard.js +35 -0
  79. package/lib/module/components/A11yCard/A11yCard.js.map +1 -0
  80. package/lib/module/components/A11yCard/A11yCard.types.js +4 -0
  81. package/lib/module/components/A11yCard/A11yCard.types.js.map +1 -0
  82. package/lib/module/components/A11yIndex/A11yIndex.js +88 -28
  83. package/lib/module/components/A11yIndex/A11yIndex.js.map +1 -1
  84. package/lib/module/components/A11yIndex/A11yIndex.types.js +35 -0
  85. package/lib/module/components/A11yIndex/A11yIndex.types.js.map +1 -0
  86. package/lib/module/components/A11yIndex/A11yIndex.web.js.map +1 -1
  87. package/lib/module/components/A11yLock/A11yFocusFrame/A11yFocusFrame.js.map +1 -1
  88. package/lib/module/components/A11yLock/A11yFocusTrap/A11yFocusTrap.js.map +1 -1
  89. package/lib/module/components/A11yLock/A11yLock.types.js.map +1 -0
  90. package/lib/module/components/{A11ySequence/A11ySequence.js → A11yOrder/A11yOrder.js} +2 -2
  91. package/lib/module/components/A11yOrder/A11yOrder.js.map +1 -0
  92. package/lib/module/components/A11yOrder/A11yOrder.types.js +4 -0
  93. package/lib/module/components/A11yOrder/A11yOrder.types.js.map +1 -0
  94. package/lib/module/components/A11yPaneTitle/A11yPaneTitle.js +6 -7
  95. package/lib/module/components/A11yPaneTitle/A11yPaneTitle.js.map +1 -1
  96. package/lib/module/components/A11yPaneTitle/A11yPaneTitle.types.js +4 -0
  97. package/lib/module/components/A11yPaneTitle/A11yPaneTitle.types.js.map +1 -0
  98. package/lib/module/components/A11yView/A11yView.js +7 -31
  99. package/lib/module/components/A11yView/A11yView.js.map +1 -1
  100. package/lib/module/components/A11yView/A11yView.types.js.map +1 -0
  101. package/lib/module/index.js +13 -9
  102. package/lib/module/index.js.map +1 -1
  103. package/lib/module/index.web.js +5 -5
  104. package/lib/module/index.web.js.map +1 -1
  105. package/lib/module/modules/A11yAnnounceModule.android.js +32 -2
  106. package/lib/module/modules/A11yAnnounceModule.android.js.map +1 -1
  107. package/lib/module/modules/A11yAnnounceModule.js +62 -7
  108. package/lib/module/modules/A11yAnnounceModule.js.map +1 -1
  109. package/{src/nativeSpecs/A11yGroupNativeComponent.ts → lib/module/nativeSpecs/A11yCardNativeComponent.ts} +3 -3
  110. package/lib/module/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
  111. package/lib/module/nativeSpecs/NativeA11yAnnounceModule.js +4 -0
  112. package/lib/module/nativeSpecs/NativeA11yAnnounceModule.js.map +1 -1
  113. package/lib/typescript/src/components/A11yCard/A11yCard.d.ts +5 -0
  114. package/lib/typescript/src/components/A11yCard/A11yCard.d.ts.map +1 -0
  115. package/lib/typescript/src/components/A11yCard/A11yCard.ios.d.ts +5 -0
  116. package/lib/typescript/src/components/A11yCard/A11yCard.ios.d.ts.map +1 -0
  117. package/lib/typescript/src/components/A11yCard/A11yCard.types.d.ts +38 -0
  118. package/lib/typescript/src/components/A11yCard/A11yCard.types.d.ts.map +1 -0
  119. package/lib/typescript/src/components/A11yIndex/A11yIndex.d.ts +10 -128
  120. package/lib/typescript/src/components/A11yIndex/A11yIndex.d.ts.map +1 -1
  121. package/lib/typescript/src/components/A11yIndex/A11yIndex.types.d.ts +101 -0
  122. package/lib/typescript/src/components/A11yIndex/A11yIndex.types.d.ts.map +1 -0
  123. package/lib/typescript/src/components/A11yIndex/A11yIndex.web.d.ts +8 -128
  124. package/lib/typescript/src/components/A11yIndex/A11yIndex.web.d.ts.map +1 -1
  125. package/lib/typescript/src/components/A11yLock/A11yBaseLock/A11yBaseLock.d.ts +1 -1
  126. package/lib/typescript/src/components/A11yLock/A11yBaseLock/A11yBaseLock.d.ts.map +1 -1
  127. package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.d.ts +1 -1
  128. package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.d.ts.map +1 -1
  129. package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.d.ts +2 -2
  130. package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.d.ts.map +1 -1
  131. package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.d.ts +1 -1
  132. package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.d.ts.map +1 -1
  133. package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.d.ts +2 -2
  134. package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.d.ts.map +1 -1
  135. package/lib/typescript/src/components/A11yLock/A11yLock.types.d.ts +35 -0
  136. package/lib/typescript/src/components/A11yLock/A11yLock.types.d.ts.map +1 -0
  137. package/lib/typescript/src/components/A11yOrder/A11yOrder.d.ts +5 -0
  138. package/lib/typescript/src/components/A11yOrder/A11yOrder.d.ts.map +1 -0
  139. package/lib/typescript/src/components/A11yOrder/A11yOrder.types.d.ts +11 -0
  140. package/lib/typescript/src/components/A11yOrder/A11yOrder.types.d.ts.map +1 -0
  141. package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.d.ts +3 -17
  142. package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.d.ts.map +1 -1
  143. package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.types.d.ts +52 -0
  144. package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.types.d.ts.map +1 -0
  145. package/lib/typescript/src/components/A11yView/A11yView.d.ts +13 -130
  146. package/lib/typescript/src/components/A11yView/A11yView.d.ts.map +1 -1
  147. package/lib/typescript/src/components/A11yView/A11yView.types.d.ts +10 -0
  148. package/lib/typescript/src/components/A11yView/A11yView.types.d.ts.map +1 -0
  149. package/lib/typescript/src/index.d.ts +29 -403
  150. package/lib/typescript/src/index.d.ts.map +1 -1
  151. package/lib/typescript/src/index.web.d.ts +20 -171
  152. package/lib/typescript/src/index.web.d.ts.map +1 -1
  153. package/lib/typescript/src/modules/A11yAnnounceModule.android.d.ts +25 -2
  154. package/lib/typescript/src/modules/A11yAnnounceModule.android.d.ts.map +1 -1
  155. package/lib/typescript/src/modules/A11yAnnounceModule.d.ts +112 -4
  156. package/lib/typescript/src/modules/A11yAnnounceModule.d.ts.map +1 -1
  157. package/lib/typescript/src/nativeSpecs/A11yCardNativeComponent.d.ts +6 -0
  158. package/lib/typescript/src/nativeSpecs/A11yCardNativeComponent.d.ts.map +1 -0
  159. package/lib/typescript/src/nativeSpecs/A11yIndexNativeComponent.d.ts +10 -6
  160. package/lib/typescript/src/nativeSpecs/A11yIndexNativeComponent.d.ts.map +1 -1
  161. package/lib/typescript/src/nativeSpecs/A11yLockNativeComponent.d.ts +1 -3
  162. package/lib/typescript/src/nativeSpecs/A11yLockNativeComponent.d.ts.map +1 -1
  163. package/lib/typescript/src/nativeSpecs/A11yOrderNativeComponent.d.ts +1 -3
  164. package/lib/typescript/src/nativeSpecs/A11yOrderNativeComponent.d.ts.map +1 -1
  165. package/lib/typescript/src/nativeSpecs/A11yPaneTitleNativeComponent.d.ts +1 -3
  166. package/lib/typescript/src/nativeSpecs/A11yPaneTitleNativeComponent.d.ts.map +1 -1
  167. package/lib/typescript/src/nativeSpecs/NativeA11yAnnounceModule.d.ts +22 -2
  168. package/lib/typescript/src/nativeSpecs/NativeA11yAnnounceModule.d.ts.map +1 -1
  169. package/package.json +12 -11
  170. package/src/components/A11yCard/A11yCard.ios.tsx +44 -0
  171. package/src/components/A11yCard/A11yCard.tsx +35 -0
  172. package/src/components/A11yCard/A11yCard.types.ts +50 -0
  173. package/src/components/A11yIndex/A11yIndex.tsx +144 -52
  174. package/src/components/A11yIndex/A11yIndex.types.ts +119 -0
  175. package/src/components/A11yIndex/A11yIndex.web.tsx +12 -17
  176. package/src/components/A11yLock/A11yBaseLock/A11yBaseLock.tsx +1 -1
  177. package/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.tsx +1 -1
  178. package/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.tsx +3 -2
  179. package/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.tsx +1 -1
  180. package/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.tsx +2 -2
  181. package/src/components/A11yLock/A11yLock.types.ts +38 -0
  182. package/src/components/{A11ySequence/A11ySequence.tsx → A11yOrder/A11yOrder.tsx} +4 -2
  183. package/src/components/A11yOrder/A11yOrder.types.ts +11 -0
  184. package/src/components/A11yPaneTitle/A11yPaneTitle.tsx +13 -19
  185. package/src/components/A11yPaneTitle/A11yPaneTitle.types.ts +58 -0
  186. package/src/components/A11yView/A11yView.tsx +8 -63
  187. package/src/components/A11yView/A11yView.types.ts +11 -0
  188. package/src/index.ts +38 -20
  189. package/src/index.web.ts +7 -14
  190. package/src/modules/A11yAnnounceModule.android.ts +18 -2
  191. package/src/modules/A11yAnnounceModule.ts +153 -9
  192. package/{lib/module/nativeSpecs/A11yGroupNativeComponent.ts → src/nativeSpecs/A11yCardNativeComponent.ts} +3 -3
  193. package/src/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
  194. package/src/nativeSpecs/NativeA11yAnnounceModule.ts +31 -1
  195. package/android/src/main/java/com/a11yorder/views/A11yGroupView/A11yGroupViewManager.java +0 -25
  196. package/android/src/main/java/com/a11yorder/views/A11yUIContainerView/A11yUIContainerViewManager.java +0 -30
  197. package/android/src/main/java/com/a11yorder/views/A11yView/A11yViewManager.java +0 -67
  198. package/android/src/newarch/A11yGroupViewManagerSpec.java +0 -9
  199. package/android/src/newarch/A11yUIContainerViewManagerSpec.java +0 -8
  200. package/android/src/newarch/A11yViewSpec.java +0 -13
  201. package/android/src/oldarch/A11yGroupViewManagerSpec.java +0 -8
  202. package/android/src/oldarch/A11yUIContainerViewManagerSpec.java +0 -9
  203. package/android/src/oldarch/A11yViewSpec.java +0 -18
  204. package/ios/views/RNAOA11yGroupView/RNAOA11yGroupView.h +0 -37
  205. package/ios/views/RNAOA11yGroupView/RNAOA11yGroupView.mm +0 -67
  206. package/ios/views/RNAOA11yGroupView/RNAOA11yGroupViewManager.h +0 -18
  207. package/ios/views/RNAOA11yGroupView/RNAOA11yGroupViewManager.mm +0 -25
  208. package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerView.h +0 -35
  209. package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerView.mm +0 -79
  210. package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerViewManager.h +0 -18
  211. package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerViewManager.mm +0 -27
  212. package/ios/views/RNAOA11yView/RNAOA11yView.h +0 -45
  213. package/ios/views/RNAOA11yView/RNAOA11yViewManager.h +0 -14
  214. package/ios/views/RNAOA11yView/RNAOA11yViewManager.mm +0 -53
  215. package/lib/commonjs/components/A11yGroup/A11yGroup.android.js +0 -18
  216. package/lib/commonjs/components/A11yGroup/A11yGroup.android.js.map +0 -1
  217. package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js +0 -24
  218. package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js.map +0 -1
  219. package/lib/commonjs/components/A11yGroup/A11yGroup.js +0 -9
  220. package/lib/commonjs/components/A11yGroup/A11yGroup.js.map +0 -1
  221. package/lib/commonjs/components/A11ySequence/A11ySequence.js.map +0 -1
  222. package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.ios.js +0 -22
  223. package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.ios.js.map +0 -1
  224. package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.js +0 -9
  225. package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.js.map +0 -1
  226. package/lib/commonjs/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
  227. package/lib/commonjs/nativeSpecs/A11yViewNativeComponent.ts +0 -36
  228. package/lib/commonjs/types/A11yGroup.types.js.map +0 -1
  229. package/lib/commonjs/types/A11yIndex.types.js +0 -13
  230. package/lib/commonjs/types/A11yIndex.types.js.map +0 -1
  231. package/lib/commonjs/types/A11yLock.types.js.map +0 -1
  232. package/lib/commonjs/types/A11yModule.types.js.map +0 -1
  233. package/lib/commonjs/types/A11yUIContainerView.types.js +0 -15
  234. package/lib/commonjs/types/A11yUIContainerView.types.js.map +0 -1
  235. package/lib/commonjs/types/A11yView.types.js.map +0 -1
  236. package/lib/module/components/A11yGroup/A11yGroup.android.js +0 -12
  237. package/lib/module/components/A11yGroup/A11yGroup.android.js.map +0 -1
  238. package/lib/module/components/A11yGroup/A11yGroup.ios.js +0 -18
  239. package/lib/module/components/A11yGroup/A11yGroup.ios.js.map +0 -1
  240. package/lib/module/components/A11yGroup/A11yGroup.js +0 -5
  241. package/lib/module/components/A11yGroup/A11yGroup.js.map +0 -1
  242. package/lib/module/components/A11ySequence/A11ySequence.js.map +0 -1
  243. package/lib/module/components/A11yUIContainer/A11yUIContainer.ios.js +0 -17
  244. package/lib/module/components/A11yUIContainer/A11yUIContainer.ios.js.map +0 -1
  245. package/lib/module/components/A11yUIContainer/A11yUIContainer.js +0 -5
  246. package/lib/module/components/A11yUIContainer/A11yUIContainer.js.map +0 -1
  247. package/lib/module/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
  248. package/lib/module/nativeSpecs/A11yViewNativeComponent.ts +0 -36
  249. package/lib/module/types/A11yGroup.types.js +0 -4
  250. package/lib/module/types/A11yGroup.types.js.map +0 -1
  251. package/lib/module/types/A11yIndex.types.js +0 -9
  252. package/lib/module/types/A11yIndex.types.js.map +0 -1
  253. package/lib/module/types/A11yLock.types.js.map +0 -1
  254. package/lib/module/types/A11yModule.types.js +0 -4
  255. package/lib/module/types/A11yModule.types.js.map +0 -1
  256. package/lib/module/types/A11yUIContainerView.types.js +0 -11
  257. package/lib/module/types/A11yUIContainerView.types.js.map +0 -1
  258. package/lib/module/types/A11yView.types.js.map +0 -1
  259. package/lib/typescript/src/components/A11yGroup/A11yGroup.android.d.ts +0 -4
  260. package/lib/typescript/src/components/A11yGroup/A11yGroup.android.d.ts.map +0 -1
  261. package/lib/typescript/src/components/A11yGroup/A11yGroup.d.ts +0 -3
  262. package/lib/typescript/src/components/A11yGroup/A11yGroup.d.ts.map +0 -1
  263. package/lib/typescript/src/components/A11yGroup/A11yGroup.ios.d.ts +0 -4
  264. package/lib/typescript/src/components/A11yGroup/A11yGroup.ios.d.ts.map +0 -1
  265. package/lib/typescript/src/components/A11ySequence/A11ySequence.d.ts +0 -126
  266. package/lib/typescript/src/components/A11ySequence/A11ySequence.d.ts.map +0 -1
  267. package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.d.ts +0 -3
  268. package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.d.ts.map +0 -1
  269. package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.ios.d.ts +0 -4
  270. package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.ios.d.ts.map +0 -1
  271. package/lib/typescript/src/nativeSpecs/A11yGroupNativeComponent.d.ts +0 -8
  272. package/lib/typescript/src/nativeSpecs/A11yGroupNativeComponent.d.ts.map +0 -1
  273. package/lib/typescript/src/nativeSpecs/A11yUIContainerNativeComponent.d.ts +0 -10
  274. package/lib/typescript/src/nativeSpecs/A11yUIContainerNativeComponent.d.ts.map +0 -1
  275. package/lib/typescript/src/nativeSpecs/A11yViewNativeComponent.d.ts +0 -26
  276. package/lib/typescript/src/nativeSpecs/A11yViewNativeComponent.d.ts.map +0 -1
  277. package/lib/typescript/src/types/A11yGroup.types.d.ts +0 -7
  278. package/lib/typescript/src/types/A11yGroup.types.d.ts.map +0 -1
  279. package/lib/typescript/src/types/A11yIndex.types.d.ts +0 -19
  280. package/lib/typescript/src/types/A11yIndex.types.d.ts.map +0 -1
  281. package/lib/typescript/src/types/A11yLock.types.d.ts +0 -8
  282. package/lib/typescript/src/types/A11yLock.types.d.ts.map +0 -1
  283. package/lib/typescript/src/types/A11yModule.types.d.ts +0 -7
  284. package/lib/typescript/src/types/A11yModule.types.d.ts.map +0 -1
  285. package/lib/typescript/src/types/A11yUIContainerView.types.d.ts +0 -13
  286. package/lib/typescript/src/types/A11yUIContainerView.types.d.ts.map +0 -1
  287. package/lib/typescript/src/types/A11yView.types.d.ts +0 -12
  288. package/lib/typescript/src/types/A11yView.types.d.ts.map +0 -1
  289. package/src/components/A11yGroup/A11yGroup.android.tsx +0 -8
  290. package/src/components/A11yGroup/A11yGroup.ios.tsx +0 -11
  291. package/src/components/A11yGroup/A11yGroup.tsx +0 -5
  292. package/src/components/A11yUIContainer/A11yUIContainer.ios.tsx +0 -20
  293. package/src/components/A11yUIContainer/A11yUIContainer.tsx +0 -5
  294. package/src/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
  295. package/src/nativeSpecs/A11yViewNativeComponent.ts +0 -36
  296. package/src/types/A11yGroup.types.ts +0 -9
  297. package/src/types/A11yIndex.types.ts +0 -21
  298. package/src/types/A11yLock.types.ts +0 -8
  299. package/src/types/A11yModule.types.ts +0 -7
  300. package/src/types/A11yUIContainerView.types.ts +0 -15
  301. package/src/types/A11yView.types.ts +0 -19
  302. /package/lib/commonjs/{types → components/A11yLock}/A11yLock.types.js +0 -0
  303. /package/lib/commonjs/{types → components/A11yView}/A11yView.types.js +0 -0
  304. /package/lib/module/{types → components/A11yLock}/A11yLock.types.js +0 -0
  305. /package/lib/module/{types → components/A11yView}/A11yView.types.js +0 -0
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { Pressable, StyleSheet, View } from 'react-native';
3
+ import Card from '../../nativeSpecs/A11yCardNativeComponent';
4
+ import type { A11yCardProps } from './A11yCard.types';
5
+
6
+ export type { A11yCardProps };
7
+
8
+ export const A11yCard = ({
9
+ containerProps,
10
+ style,
11
+ testID,
12
+ onPress,
13
+ accessibility,
14
+ pressableProps,
15
+ children,
16
+ }: A11yCardProps) => {
17
+ return (
18
+ <Card {...containerProps} style={[styles.container, containerProps?.style]}>
19
+ <View
20
+ testID={`${testID}-overlay`}
21
+ accessibilityRole="button"
22
+ {...accessibility}
23
+ accessible
24
+ pointerEvents="none"
25
+ onAccessibilityTap={onPress}
26
+ style={styles.overlay}
27
+ />
28
+ <Pressable
29
+ {...pressableProps}
30
+ accessible={false}
31
+ onPress={onPress}
32
+ testID={testID}
33
+ style={style}
34
+ >
35
+ {children}
36
+ </Pressable>
37
+ </Card>
38
+ );
39
+ };
40
+
41
+ const styles = StyleSheet.create({
42
+ container: { position: 'relative' },
43
+ overlay: StyleSheet.absoluteFillObject,
44
+ });
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { Pressable, StyleSheet, View } from 'react-native';
3
+ import type { A11yCardProps } from './A11yCard.types';
4
+
5
+ export type { A11yCardProps };
6
+
7
+ export const A11yCard = ({
8
+ containerProps,
9
+ style,
10
+ testID,
11
+ onPress,
12
+ accessibility,
13
+ pressableProps,
14
+ children,
15
+ }: A11yCardProps) => {
16
+ return (
17
+ <View collapsable={false} {...containerProps}>
18
+ <Pressable
19
+ {...pressableProps}
20
+ accessibilityRole="button"
21
+ {...accessibility}
22
+ accessible
23
+ onPress={onPress}
24
+ testID={testID}
25
+ style={[style, styles.container]}
26
+ >
27
+ {children}
28
+ </Pressable>
29
+ </View>
30
+ );
31
+ };
32
+
33
+ const styles = StyleSheet.create({
34
+ container: { position: 'relative' },
35
+ });
@@ -0,0 +1,50 @@
1
+ import type {
2
+ ViewStyle,
3
+ StyleProp,
4
+ ViewProps,
5
+ PressableProps,
6
+ } from 'react-native';
7
+
8
+ /** Accessibility props forwarded to the focusable overlay (iOS) or the Pressable (Android). */
9
+ export type A11yCardAccessibilityProps = ViewProps;
10
+
11
+ export interface A11yCardProps {
12
+ /**
13
+ * Props applied to the container View wrapping the card.
14
+ * Use this for layout-level concerns: position, margins, flex, etc.
15
+ */
16
+ containerProps?: ViewProps;
17
+
18
+ /**
19
+ * Style for the card surface (the inner Pressable).
20
+ * Use this for visual appearance: background color, border radius, padding, etc.
21
+ */
22
+ style?: StyleProp<ViewStyle>;
23
+
24
+ /**
25
+ * Used to locate this view in end-to-end tests.
26
+ */
27
+ testID?: string;
28
+
29
+ /**
30
+ * Called when the user taps the card.
31
+ */
32
+ onPress?: () => void;
33
+
34
+ /**
35
+ * View/Accessibility props for the card action — `accessibilityLabel`, `accessibilityHint`,
36
+ * `accessibilityRole`, `accessibilityState`, etc.
37
+ *
38
+ * On iOS these are forwarded to a full-cover overlay that VoiceOver focuses.
39
+ * On Android they are applied directly to the Pressable.
40
+ */
41
+ accessibility?: A11yCardAccessibilityProps;
42
+
43
+ /**
44
+ * Props passed directly to the underlying `Pressable`.
45
+ * Use this for `hitSlop`, `android_ripple`, `onLongPress`, etc.
46
+ */
47
+ pressableProps?: PressableProps;
48
+
49
+ children?: React.ReactNode;
50
+ }
@@ -1,4 +1,5 @@
1
1
  import React, { useImperativeHandle, useRef } from 'react';
2
+ import type { ViewProps } from 'react-native';
2
3
  import { A11ySequenceOrderContext } from '../../context/A11ySequenceOrderContext';
3
4
  import A11yIndexView, {
4
5
  Commands,
@@ -6,8 +7,113 @@ import A11yIndexView, {
6
7
  import {
7
8
  type A11yIndexProps,
8
9
  A11yOrderTypeEnum,
10
+ type A11yOrderType,
9
11
  type IndexCommands,
10
- } from '../../types/A11yIndex.types';
12
+ A11yContainerTypeEnum,
13
+ } from './A11yIndex.types';
14
+
15
+ type ScreenReaderCallbacks = Pick<
16
+ A11yIndexProps,
17
+ | 'onScreenReaderFocused'
18
+ | 'onScreenReaderSubViewFocusChange'
19
+ | 'onScreenReaderSubViewFocused'
20
+ | 'onScreenReaderSubViewBlurred'
21
+ | 'onScreenReaderDescendantFocusChanged'
22
+ >;
23
+
24
+ function useScreenReaderProps({
25
+ onScreenReaderFocused,
26
+ onScreenReaderSubViewFocusChange,
27
+ onScreenReaderSubViewFocused,
28
+ onScreenReaderSubViewBlurred,
29
+ onScreenReaderDescendantFocusChanged,
30
+ }: ScreenReaderCallbacks) {
31
+ const hasHandler = Boolean(
32
+ onScreenReaderSubViewBlurred ||
33
+ onScreenReaderSubViewFocused ||
34
+ onScreenReaderSubViewFocusChange
35
+ );
36
+
37
+ const onScreenReaderFocusChange = React.useCallback(
38
+ (event: { nativeEvent: { isFocused: boolean } }) => {
39
+ const { isFocused } = event.nativeEvent;
40
+ onScreenReaderSubViewFocusChange?.(isFocused);
41
+ if (isFocused) {
42
+ onScreenReaderSubViewFocused?.();
43
+ } else {
44
+ onScreenReaderSubViewBlurred?.();
45
+ }
46
+ },
47
+ [
48
+ onScreenReaderSubViewFocusChange,
49
+ onScreenReaderSubViewBlurred,
50
+ onScreenReaderSubViewFocused,
51
+ ]
52
+ );
53
+
54
+ return {
55
+ onScreenReaderFocused,
56
+ onScreenReaderFocusChange: hasHandler
57
+ ? onScreenReaderFocusChange
58
+ : undefined,
59
+ descendantFocusChangedEnabled: Boolean(
60
+ onScreenReaderDescendantFocusChanged
61
+ ),
62
+ onScreenReaderDescendantFocusChanged,
63
+ };
64
+ }
65
+
66
+ function useFocusRef(ref: React.ForwardedRef<IndexCommands>) {
67
+ const localRef = useRef<React.ComponentRef<typeof A11yIndexView>>(null);
68
+
69
+ useImperativeHandle(ref, () => {
70
+ const native = localRef.current as unknown as Record<string, unknown>;
71
+
72
+ return new Proxy({} as IndexCommands, {
73
+ get(_target, prop: string) {
74
+ if (prop === 'focus') {
75
+ return () => {
76
+ if (localRef.current) {
77
+ // @ts-expect-error Commands.focus type is too generic in codegen
78
+ Commands.focus(localRef.current);
79
+ }
80
+ };
81
+ }
82
+ return native?.[prop];
83
+ },
84
+ });
85
+ });
86
+
87
+ return localRef;
88
+ }
89
+
90
+ function useOrderProps(
91
+ index: number | undefined,
92
+ orderType: A11yOrderType | undefined,
93
+ importantForAccessibilityProp: ViewProps['importantForAccessibility']
94
+ ) {
95
+ const orderKey = React.useContext(A11ySequenceOrderContext);
96
+ const hasOrderInfo = typeof index === 'number' || !!orderKey;
97
+
98
+ if (hasOrderInfo && !orderKey) {
99
+ throw new Error(
100
+ '<A11y.Index> element should be used inside of <A11y.Order> container'
101
+ );
102
+ }
103
+
104
+ const resolvedOrderType = orderType ?? 'default';
105
+ const importantForAccessibilityFallback =
106
+ resolvedOrderType === 'default' ? ('yes' as const) : undefined;
107
+
108
+ return {
109
+ orderKey,
110
+ orderFocusType: hasOrderInfo
111
+ ? A11yOrderTypeEnum[resolvedOrderType]
112
+ : undefined,
113
+ importantForAccessibility:
114
+ importantForAccessibilityProp ?? importantForAccessibilityFallback,
115
+ };
116
+ }
11
117
 
12
118
  export const A11yIndex = React.memo(
13
119
  React.forwardRef<IndexCommands, A11yIndexProps>(
@@ -15,72 +121,58 @@ export const A11yIndex = React.memo(
15
121
  {
16
122
  children,
17
123
  index,
18
- orderType = 'default',
19
- onScreenReaderSubViewFocusChange,
20
- onScreenReaderSubViewFocused,
21
- onScreenReaderSubViewBlurred,
124
+ orderType,
125
+ a11yUIContainer,
126
+ shouldGroupAccessibilityChildren,
22
127
  ...props
23
128
  },
24
129
  ref
25
130
  ) => {
26
- const hasHandler = Boolean(
27
- onScreenReaderSubViewBlurred ||
28
- onScreenReaderSubViewFocused ||
29
- onScreenReaderSubViewFocusChange
30
- );
31
-
32
- const onScreenReaderChangeHandler = React.useCallback(
33
- (event: { nativeEvent: { isFocused: boolean } }) => {
34
- onScreenReaderSubViewFocusChange?.(event.nativeEvent.isFocused);
35
- if (event.nativeEvent.isFocused) {
36
- onScreenReaderSubViewFocused?.();
37
- } else {
38
- onScreenReaderSubViewBlurred?.();
39
- }
40
- },
41
- [
42
- onScreenReaderSubViewFocusChange,
43
- onScreenReaderSubViewBlurred,
44
- onScreenReaderSubViewFocused,
45
- ]
46
- );
131
+ const {
132
+ onScreenReaderFocused,
133
+ onScreenReaderSubViewFocusChange,
134
+ onScreenReaderSubViewFocused,
135
+ onScreenReaderSubViewBlurred,
136
+ onScreenReaderDescendantFocusChanged,
137
+ importantForAccessibility: importantForAccessibilityProp,
138
+ ...viewProps
139
+ } = props;
47
140
 
48
- const onScreenReaderHandlerProp = hasHandler
49
- ? onScreenReaderChangeHandler
141
+ const containerTypeValue = a11yUIContainer
142
+ ? A11yContainerTypeEnum[a11yUIContainer]
50
143
  : undefined;
51
144
 
52
- const orderKey = React.useContext(A11ySequenceOrderContext);
53
- if (!orderKey) {
54
- throw new Error(
55
- '<A11y.Index> element should be used inside of <A11y.Order> container'
56
- );
57
- }
145
+ const shouldGroupChildrenValue =
146
+ shouldGroupAccessibilityChildren === undefined
147
+ ? -1
148
+ : shouldGroupAccessibilityChildren
149
+ ? 1
150
+ : 0;
58
151
 
59
- // @ts-ignore
60
- const indexRef = useRef<React.ElementRef<React.ComponentType>>(null);
152
+ const screenReaderNativeProps = useScreenReaderProps({
153
+ onScreenReaderFocused,
154
+ onScreenReaderSubViewFocusChange,
155
+ onScreenReaderSubViewFocused,
156
+ onScreenReaderSubViewBlurred,
157
+ onScreenReaderDescendantFocusChanged,
158
+ });
61
159
 
62
- useImperativeHandle(ref, () => ({
63
- focus: () => {
64
- if (indexRef.current) {
65
- Commands.focus(indexRef.current);
66
- }
67
- },
68
- }));
160
+ const { orderKey, orderFocusType, importantForAccessibility } =
161
+ useOrderProps(index, orderType, importantForAccessibilityProp);
69
162
 
70
- const importantForAccessibility =
71
- orderType === 'default' ? 'yes' : undefined;
163
+ const localRef = useFocusRef(ref);
72
164
 
73
165
  return (
74
166
  <A11yIndexView
75
- importantForAccessibility={
76
- props.importantForAccessibility ?? importantForAccessibility
77
- }
78
- orderFocusType={A11yOrderTypeEnum[orderType]}
79
- ref={indexRef as React.Ref<any>}
167
+ ref={localRef as React.Ref<any>}
168
+ {...viewProps}
169
+ containerType={containerTypeValue}
170
+ shouldGroupAccessibilityChildren={shouldGroupChildrenValue}
171
+ importantForAccessibility={importantForAccessibility}
172
+ orderFocusType={orderFocusType}
80
173
  orderIndex={index}
81
174
  orderKey={orderKey}
82
- {...props}
83
- onScreenReaderFocusChange={onScreenReaderHandlerProp}
175
+ {...screenReaderNativeProps}
84
176
  >
85
177
  {children}
86
178
  </A11yIndexView>
@@ -0,0 +1,119 @@
1
+ import React from 'react';
2
+ import type { NativeSyntheticEvent, View, ViewProps } from 'react-native';
3
+ import type { ScreenReaderDescendantFocusChanged } from '../../nativeSpecs/A11yIndexNativeComponent';
4
+
5
+ /** Ref handle for {@link A11y.Index} — exposes `focus()` to move screen reader focus programmatically. */
6
+ export type IndexCommands = Omit<React.ComponentRef<typeof View>, 'focus'> & {
7
+ /** Moves screen reader focus to this element. */
8
+ focus: () => void;
9
+ };
10
+
11
+ /** Numeric backing values for {@link A11yOrderType}. Kept for consumers who need the raw number. */
12
+ export const A11yOrderTypeEnum = {
13
+ default: 0,
14
+ child: 1,
15
+ subview: 2,
16
+ } as const;
17
+
18
+ /** @internal Numeric backing values for {@link A11yUIContainerType}. */
19
+ export const A11yContainerTypeEnum = {
20
+ none: 0,
21
+ table: 1,
22
+ list: 2,
23
+ landmark: 3,
24
+ group: 4,
25
+ } as const;
26
+
27
+ /**
28
+ * iOS only — sets `UIAccessibilityContainerType` on the wrapping view.
29
+ * Tells VoiceOver what kind of container this is: `'list'`, `'table'`, `'landmark'`, etc.
30
+ */
31
+ export type A11yUIContainerType = keyof typeof A11yContainerTypeEnum;
32
+
33
+ /**
34
+ * Controls which element receives screen reader focus for this index slot.
35
+ *
36
+ * - `'default'` — the `A11y.Index` view itself
37
+ * - `'child'` — the first accessible child (useful when the index wrapper has no visual presence)
38
+ * - `'subview'` — first accessible child via an older traversal path
39
+ */
40
+ export type A11yOrderType = keyof typeof A11yOrderTypeEnum;
41
+
42
+ /** The native event payload emitted by `onScreenReaderDescendantFocusChanged`. */
43
+ export type ScreenReaderDescendantFocusChangedEvent =
44
+ NativeSyntheticEvent<ScreenReaderDescendantFocusChanged>;
45
+
46
+ export type A11yIndexProps = ViewProps & {
47
+ children: React.ReactNode;
48
+
49
+ /**
50
+ * Numeric position of this element in the parent `A11y.Order` sequence.
51
+ * Lower numbers are focused first; ties are resolved by render order.
52
+ */
53
+ index?: number;
54
+
55
+ /**
56
+ * Controls which element VoiceOver / TalkBack actually focuses for this slot.
57
+ *
58
+ * - `'default'` — the `A11y.Index` view itself receives focus
59
+ * - `'child'` — the first accessible descendant receives focus (useful when
60
+ * the index wrapper has no visual presence of its own)
61
+ * - `'subview'` — focuses the first direct child view rather than the first accessible descendant
62
+ *
63
+ * Defaults to `'default'`.
64
+ */
65
+ orderType?: A11yOrderType;
66
+
67
+ /**
68
+ * iOS only — sets `UIAccessibilityContainerType` on the wrapping view.
69
+ * Helps VoiceOver understand the semantic role of the container:
70
+ * `'list'`, `'table'`, `'landmark'`, etc.
71
+ *
72
+ * @platform ios
73
+ */
74
+ a11yUIContainer?: A11yUIContainerType;
75
+
76
+ /**
77
+ * iOS only — maps to `shouldGroupAccessibilityChildren` on the native view.
78
+ * Determines whether VoiceOver treats descendants as one grouped unit
79
+ * or navigates them individually.
80
+ *
81
+ * - `true` — VoiceOver focuses the wrapper as a single element and builds
82
+ * a combined label from its children.
83
+ * - `false` — descendants stay individually focusable even when iOS would
84
+ * otherwise collapse them.
85
+ * - omitted — defers to the platform default.
86
+ *
87
+ * @platform ios
88
+ */
89
+ shouldGroupAccessibilityChildren?: boolean;
90
+
91
+ /**
92
+ * Called when the screen reader focuses this element directly (not a descendant).
93
+ */
94
+ onScreenReaderFocused?: () => void;
95
+
96
+ /**
97
+ * Called when screen reader focus enters or leaves any descendant.
98
+ * Receives `true` on enter and `false` on leave.
99
+ */
100
+ onScreenReaderSubViewFocusChange?: (isFocused: boolean) => void;
101
+
102
+ /**
103
+ * Called when screen reader focus enters any descendant.
104
+ */
105
+ onScreenReaderSubViewFocused?: () => void;
106
+
107
+ /**
108
+ * Called when screen reader focus leaves any descendant.
109
+ */
110
+ onScreenReaderSubViewBlurred?: () => void;
111
+
112
+ /**
113
+ * Called with the full native event when screen reader focus changes on any descendant.
114
+ * Use this when you need the `nativeId` of the focused element.
115
+ */
116
+ onScreenReaderDescendantFocusChanged?: (
117
+ e: ScreenReaderDescendantFocusChangedEvent
118
+ ) => void;
119
+ };
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
2
  import { forwardRef, useImperativeHandle, useRef } from 'react';
3
- import type {
4
- IndexCommands,
5
- A11yIndexProps,
6
- } from '../../types/A11yIndex.types';
3
+ import type { A11yIndexProps } from './A11yIndex.types';
7
4
  import { UIManager } from 'react-native';
8
5
  import { View } from 'react-native';
9
6
 
@@ -11,17 +8,15 @@ const WebUiManager = UIManager as unknown as {
11
8
  focus: (v: View) => void;
12
9
  };
13
10
 
14
- export const A11yIndex = forwardRef<IndexCommands, A11yIndexProps>(
15
- (props, ref) => {
16
- const viewRef = useRef<View>(null);
17
- useImperativeHandle(ref, () => ({
18
- focus: () => {
19
- if (viewRef.current) {
20
- WebUiManager.focus(viewRef.current);
21
- }
22
- },
23
- }));
11
+ export const A11yIndex = forwardRef<{}, A11yIndexProps>((props, ref) => {
12
+ const viewRef = useRef<View>(null);
13
+ useImperativeHandle(ref, () => ({
14
+ focus: () => {
15
+ if (viewRef.current) {
16
+ WebUiManager.focus(viewRef.current);
17
+ }
18
+ },
19
+ }));
24
20
 
25
- return <View {...props} ref={viewRef as any} />;
26
- }
27
- );
21
+ return <View {...props} ref={viewRef as any} />;
22
+ });
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import A11yLockNativeComponent from '../../../nativeSpecs/A11yLockNativeComponent';
3
- import type { A11yLockProps } from '../../../types/A11yLock.types';
3
+ import type { A11yLockProps } from '../A11yLock.types';
4
4
 
5
5
  export const A11yBaseLock = React.memo<A11yLockProps>(
6
6
  ({
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { A11yLockProps } from '../../../types/A11yLock.types';
2
+ import type { A11yLockProps } from '../A11yLock.types';
3
3
  import { A11yBaseLock } from '../A11yBaseLock/A11yBaseLock';
4
4
  import { A11yFrameProvider } from '../../../context/A11yFocusFrameProviderContext';
5
5
 
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { View, type ViewProps } from 'react-native';
2
+ import { View } from 'react-native';
3
3
  import { A11yFrameProvider } from '../../../context/A11yFocusFrameProviderContext';
4
+ import type { A11yFocusFrameProps } from '../A11yLock.types';
4
5
 
5
- export const A11yFocusFrame = (props: ViewProps) => (
6
+ export const A11yFocusFrame = (props: A11yFocusFrameProps) => (
6
7
  <A11yFrameProvider>
7
8
  <View {...props} />
8
9
  </A11yFrameProvider>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { A11yLockProps } from '../../../types/A11yLock.types';
2
+ import type { A11yLockProps } from '../A11yLock.types';
3
3
  import { A11yBaseLock } from '../A11yBaseLock/A11yBaseLock';
4
4
  import { A11yFocusTrapMountWrapper } from './A11yFocusTrapMountWrapper';
5
5
 
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
- import type { A11yLockProps } from '../../../types/A11yLock.types';
3
+ import type { A11yFocusTrapProps } from '../A11yLock.types';
4
4
  import { A11yFocusTrapMountWrapper } from './A11yFocusTrapMountWrapper';
5
5
  import { A11yBaseLock } from '../A11yBaseLock/A11yBaseLock';
6
6
 
7
7
  export const A11yFocusTrap = ({
8
8
  forceLock = false,
9
9
  ...props
10
- }: A11yLockProps) => {
10
+ }: A11yFocusTrapProps) => {
11
11
  if (forceLock) {
12
12
  return (
13
13
  <A11yFocusTrapMountWrapper>
@@ -0,0 +1,38 @@
1
+ import type { ViewProps } from 'react-native';
2
+
3
+ /**
4
+ * Props for {@link A11y.FocusTrap} — confines VoiceOver / TalkBack focus to this subtree.
5
+ * Useful for modals, bottom sheets, and overlays where focus must not leak out.
6
+ */
7
+ export type A11yFocusTrapProps = ViewProps & {
8
+ /**
9
+ * When `true`, the focus trap is inactive and the screen reader can navigate
10
+ * freely outside this container.
11
+ *
12
+ * Defaults to `false`.
13
+ */
14
+ lockDisabled?: boolean;
15
+
16
+ /**
17
+ * When `true`, focus is moved inside the trap immediately on mount rather than
18
+ * waiting for the next accessibility navigation gesture.
19
+ * Use this for programmatically-opened modals and sheets.
20
+ *
21
+ * Defaults to `false`.
22
+ */
23
+ forceLock?: boolean;
24
+ };
25
+
26
+ /**
27
+ * Props for {@link A11y.FocusFrame} — detects when screen reader focus escapes
28
+ * this subtree, enabling focus-leak detection in complex UIs.
29
+ */
30
+ export type A11yFocusFrameProps = ViewProps;
31
+
32
+ /** @internal Full props accepted by the native lock component. Not part of the public API. */
33
+ export type A11yLockProps = ViewProps & {
34
+ componentType?: number;
35
+ containerKey?: string;
36
+ lockDisabled?: boolean;
37
+ forceLock?: boolean;
38
+ };
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
- import type { ViewProps } from 'react-native';
3
2
  import { A11ySequenceOrderContext } from '../../context/A11ySequenceOrderContext';
4
3
  import A11yOrderNativeComponent from '../../nativeSpecs/A11yOrderNativeComponent';
4
+ import type { A11yOrderProps } from './A11yOrder.types';
5
5
 
6
- export const A11yIndexSequence = React.memo<ViewProps>((props) => {
6
+ export type { A11yOrderProps };
7
+
8
+ export const A11yOrder = React.memo<A11yOrderProps>((props) => {
7
9
  const orderKey = React.useId();
8
10
  return (
9
11
  <A11ySequenceOrderContext.Provider value={orderKey}>
@@ -0,0 +1,11 @@
1
+ import type { ViewProps } from 'react-native';
2
+
3
+ /**
4
+ * Props for {@link A11y.Order} — a container that defines an explicit screen reader
5
+ * focus sequence for its `A11y.Index` children.
6
+ *
7
+ * All standard `View` props are accepted and forwarded to the underlying native view.
8
+ * The `orderKey` that links child `A11y.Index` elements to this container is generated
9
+ * internally via `React.useId` and requires no prop.
10
+ */
11
+ export type A11yOrderProps = ViewProps;