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.
- package/README.md +55 -334
- package/android/src/main/java/com/a11yorder/A11yOrderPackage.java +2 -6
- package/android/src/main/java/com/a11yorder/core/A11yManagedFocusView.java +29 -0
- package/android/src/main/java/com/a11yorder/{views/A11yView/A11yView.java → core/A11yScreenReaderView.java} +3 -45
- package/android/src/main/java/com/a11yorder/core/A11yViewOrder.java +37 -0
- package/android/src/main/java/com/a11yorder/modules/A11yAnnounceModule.java +20 -7
- package/android/src/main/java/com/a11yorder/views/A11yCardView/A11yCardViewManager.java +18 -0
- package/android/src/main/java/com/a11yorder/views/A11yIndexView/A11yIndexView.java +2 -65
- package/android/src/main/java/com/a11yorder/views/A11yIndexView/A11yIndexViewManager.java +21 -0
- package/android/src/newarch/A11yCardViewManagerSpec.java +9 -0
- package/android/src/oldarch/A11yAnnounceModuleSpec.java +8 -1
- package/android/src/oldarch/A11yCardViewManagerSpec.java +8 -0
- package/android/src/oldarch/A11yIndexViewManagerSpec.java +8 -0
- package/ios/helpers/RNAOFabricEventHelper/RNAOFabricEventHelper.mm +5 -5
- package/ios/helpers/RNAOSpeechAttributes.h +35 -0
- package/ios/helpers/RNAOSpeechAttributes.mm +64 -0
- package/ios/modules/RNAOA11yAnnounceModule.h +13 -9
- package/ios/modules/RNAOA11yAnnounceModule.mm +220 -14
- package/ios/services/RNAOA11yAnnounceService/RNAOA11yAnnounceService.h +11 -1
- package/ios/services/RNAOA11yAnnounceService/RNAOA11yAnnounceService.mm +55 -51
- package/ios/views/RNAOA11yCardView/RNAOA11yCardView.h +29 -0
- package/ios/views/RNAOA11yCardView/RNAOA11yCardView.mm +83 -0
- package/ios/views/RNAOA11yCardView/RNAOA11yCardViewManager.h +14 -0
- package/ios/views/RNAOA11yCardView/RNAOA11yCardViewManager.mm +17 -0
- package/ios/views/RNAOA11yIndexView/RNAOA11yIndexView.h +2 -41
- package/ios/views/RNAOA11yIndexView/RNAOA11yIndexView.mm +24 -128
- package/ios/views/RNAOA11yIndexView/RNAOA11yIndexViewManager.mm +15 -0
- package/ios/views/RNAOA11yPaneTitleView/RNAOA11yPaneTitleView.mm +12 -2
- package/ios/views/base/RNAOA11yGroupChildrenView.h +21 -0
- package/ios/views/base/RNAOA11yGroupChildrenView.mm +19 -0
- package/ios/views/base/RNAOA11yManagedFocusView.h +28 -0
- package/ios/views/{RNAOA11yView/RNAOA11yView.mm → base/RNAOA11yManagedFocusView.mm} +64 -183
- package/ios/views/base/RNAOA11yScreenReaderView.h +24 -0
- package/ios/views/base/RNAOA11yScreenReaderView.mm +32 -0
- package/ios/views/base/RNAOA11yViewGroup.h +35 -0
- package/ios/views/base/RNAOA11yViewGroup.mm +46 -0
- package/ios/views/base/RNAOA11yViewOrder.h +40 -0
- package/ios/views/base/RNAOA11yViewOrder.mm +92 -0
- package/lib/commonjs/components/A11yCard/A11yCard.ios.js +49 -0
- package/lib/commonjs/components/A11yCard/A11yCard.ios.js.map +1 -0
- package/lib/commonjs/components/A11yCard/A11yCard.js +41 -0
- package/lib/commonjs/components/A11yCard/A11yCard.js.map +1 -0
- package/lib/commonjs/{types/A11yGroup.types.js → components/A11yCard/A11yCard.types.js} +1 -1
- package/lib/commonjs/components/A11yCard/A11yCard.types.js.map +1 -0
- package/lib/commonjs/components/A11yIndex/A11yIndex.js +88 -28
- package/lib/commonjs/components/A11yIndex/A11yIndex.js.map +1 -1
- package/lib/commonjs/components/A11yIndex/A11yIndex.types.js +39 -0
- package/lib/commonjs/components/A11yIndex/A11yIndex.types.js.map +1 -0
- package/lib/commonjs/components/A11yIndex/A11yIndex.web.js.map +1 -1
- package/lib/commonjs/components/A11yLock/A11yFocusFrame/A11yFocusFrame.js.map +1 -1
- package/lib/commonjs/components/A11yLock/A11yFocusTrap/A11yFocusTrap.js.map +1 -1
- package/lib/commonjs/components/A11yLock/A11yLock.types.js.map +1 -0
- package/lib/commonjs/components/{A11ySequence/A11ySequence.js → A11yOrder/A11yOrder.js} +3 -3
- package/lib/commonjs/components/A11yOrder/A11yOrder.js.map +1 -0
- package/lib/commonjs/{types/A11yModule.types.js → components/A11yOrder/A11yOrder.types.js} +1 -1
- package/lib/commonjs/components/A11yOrder/A11yOrder.types.js.map +1 -0
- package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.js +6 -7
- package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.js.map +1 -1
- package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.types.js +6 -0
- package/lib/commonjs/components/A11yPaneTitle/A11yPaneTitle.types.js.map +1 -0
- package/lib/commonjs/components/A11yView/A11yView.js +7 -33
- package/lib/commonjs/components/A11yView/A11yView.js.map +1 -1
- package/lib/commonjs/components/A11yView/A11yView.types.js.map +1 -0
- package/lib/commonjs/index.js +37 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +12 -6
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/modules/A11yAnnounceModule.android.js +37 -3
- package/lib/commonjs/modules/A11yAnnounceModule.android.js.map +1 -1
- package/lib/commonjs/modules/A11yAnnounceModule.js +66 -8
- package/lib/commonjs/modules/A11yAnnounceModule.js.map +1 -1
- package/lib/commonjs/nativeSpecs/{A11yGroupNativeComponent.ts → A11yCardNativeComponent.ts} +3 -3
- package/lib/commonjs/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
- package/lib/commonjs/nativeSpecs/NativeA11yAnnounceModule.js +2 -0
- package/lib/commonjs/nativeSpecs/NativeA11yAnnounceModule.js.map +1 -1
- package/lib/module/components/A11yCard/A11yCard.ios.js +43 -0
- package/lib/module/components/A11yCard/A11yCard.ios.js.map +1 -0
- package/lib/module/components/A11yCard/A11yCard.js +35 -0
- package/lib/module/components/A11yCard/A11yCard.js.map +1 -0
- package/lib/module/components/A11yCard/A11yCard.types.js +4 -0
- package/lib/module/components/A11yCard/A11yCard.types.js.map +1 -0
- package/lib/module/components/A11yIndex/A11yIndex.js +88 -28
- package/lib/module/components/A11yIndex/A11yIndex.js.map +1 -1
- package/lib/module/components/A11yIndex/A11yIndex.types.js +35 -0
- package/lib/module/components/A11yIndex/A11yIndex.types.js.map +1 -0
- package/lib/module/components/A11yIndex/A11yIndex.web.js.map +1 -1
- package/lib/module/components/A11yLock/A11yFocusFrame/A11yFocusFrame.js.map +1 -1
- package/lib/module/components/A11yLock/A11yFocusTrap/A11yFocusTrap.js.map +1 -1
- package/lib/module/components/A11yLock/A11yLock.types.js.map +1 -0
- package/lib/module/components/{A11ySequence/A11ySequence.js → A11yOrder/A11yOrder.js} +2 -2
- package/lib/module/components/A11yOrder/A11yOrder.js.map +1 -0
- package/lib/module/components/A11yOrder/A11yOrder.types.js +4 -0
- package/lib/module/components/A11yOrder/A11yOrder.types.js.map +1 -0
- package/lib/module/components/A11yPaneTitle/A11yPaneTitle.js +6 -7
- package/lib/module/components/A11yPaneTitle/A11yPaneTitle.js.map +1 -1
- package/lib/module/components/A11yPaneTitle/A11yPaneTitle.types.js +4 -0
- package/lib/module/components/A11yPaneTitle/A11yPaneTitle.types.js.map +1 -0
- package/lib/module/components/A11yView/A11yView.js +7 -31
- package/lib/module/components/A11yView/A11yView.js.map +1 -1
- package/lib/module/components/A11yView/A11yView.types.js.map +1 -0
- package/lib/module/index.js +13 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +5 -5
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/modules/A11yAnnounceModule.android.js +32 -2
- package/lib/module/modules/A11yAnnounceModule.android.js.map +1 -1
- package/lib/module/modules/A11yAnnounceModule.js +62 -7
- package/lib/module/modules/A11yAnnounceModule.js.map +1 -1
- package/{src/nativeSpecs/A11yGroupNativeComponent.ts → lib/module/nativeSpecs/A11yCardNativeComponent.ts} +3 -3
- package/lib/module/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
- package/lib/module/nativeSpecs/NativeA11yAnnounceModule.js +4 -0
- package/lib/module/nativeSpecs/NativeA11yAnnounceModule.js.map +1 -1
- package/lib/typescript/src/components/A11yCard/A11yCard.d.ts +5 -0
- package/lib/typescript/src/components/A11yCard/A11yCard.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yCard/A11yCard.ios.d.ts +5 -0
- package/lib/typescript/src/components/A11yCard/A11yCard.ios.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yCard/A11yCard.types.d.ts +38 -0
- package/lib/typescript/src/components/A11yCard/A11yCard.types.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yIndex/A11yIndex.d.ts +10 -128
- package/lib/typescript/src/components/A11yIndex/A11yIndex.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yIndex/A11yIndex.types.d.ts +101 -0
- package/lib/typescript/src/components/A11yIndex/A11yIndex.types.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yIndex/A11yIndex.web.d.ts +8 -128
- package/lib/typescript/src/components/A11yIndex/A11yIndex.web.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yBaseLock/A11yBaseLock.d.ts +1 -1
- package/lib/typescript/src/components/A11yLock/A11yBaseLock/A11yBaseLock.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.d.ts +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.d.ts +2 -2
- package/lib/typescript/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.d.ts +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.d.ts +2 -2
- package/lib/typescript/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yLock/A11yLock.types.d.ts +35 -0
- package/lib/typescript/src/components/A11yLock/A11yLock.types.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yOrder/A11yOrder.d.ts +5 -0
- package/lib/typescript/src/components/A11yOrder/A11yOrder.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yOrder/A11yOrder.types.d.ts +11 -0
- package/lib/typescript/src/components/A11yOrder/A11yOrder.types.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.d.ts +3 -17
- package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.types.d.ts +52 -0
- package/lib/typescript/src/components/A11yPaneTitle/A11yPaneTitle.types.d.ts.map +1 -0
- package/lib/typescript/src/components/A11yView/A11yView.d.ts +13 -130
- package/lib/typescript/src/components/A11yView/A11yView.d.ts.map +1 -1
- package/lib/typescript/src/components/A11yView/A11yView.types.d.ts +10 -0
- package/lib/typescript/src/components/A11yView/A11yView.types.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +29 -403
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +20 -171
- package/lib/typescript/src/index.web.d.ts.map +1 -1
- package/lib/typescript/src/modules/A11yAnnounceModule.android.d.ts +25 -2
- package/lib/typescript/src/modules/A11yAnnounceModule.android.d.ts.map +1 -1
- package/lib/typescript/src/modules/A11yAnnounceModule.d.ts +112 -4
- package/lib/typescript/src/modules/A11yAnnounceModule.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpecs/A11yCardNativeComponent.d.ts +6 -0
- package/lib/typescript/src/nativeSpecs/A11yCardNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/nativeSpecs/A11yIndexNativeComponent.d.ts +10 -6
- package/lib/typescript/src/nativeSpecs/A11yIndexNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpecs/A11yLockNativeComponent.d.ts +1 -3
- package/lib/typescript/src/nativeSpecs/A11yLockNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpecs/A11yOrderNativeComponent.d.ts +1 -3
- package/lib/typescript/src/nativeSpecs/A11yOrderNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpecs/A11yPaneTitleNativeComponent.d.ts +1 -3
- package/lib/typescript/src/nativeSpecs/A11yPaneTitleNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeSpecs/NativeA11yAnnounceModule.d.ts +22 -2
- package/lib/typescript/src/nativeSpecs/NativeA11yAnnounceModule.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/components/A11yCard/A11yCard.ios.tsx +44 -0
- package/src/components/A11yCard/A11yCard.tsx +35 -0
- package/src/components/A11yCard/A11yCard.types.ts +50 -0
- package/src/components/A11yIndex/A11yIndex.tsx +144 -52
- package/src/components/A11yIndex/A11yIndex.types.ts +119 -0
- package/src/components/A11yIndex/A11yIndex.web.tsx +12 -17
- package/src/components/A11yLock/A11yBaseLock/A11yBaseLock.tsx +1 -1
- package/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.android.tsx +1 -1
- package/src/components/A11yLock/A11yFocusFrame/A11yFocusFrame.tsx +3 -2
- package/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.android.tsx +1 -1
- package/src/components/A11yLock/A11yFocusTrap/A11yFocusTrap.tsx +2 -2
- package/src/components/A11yLock/A11yLock.types.ts +38 -0
- package/src/components/{A11ySequence/A11ySequence.tsx → A11yOrder/A11yOrder.tsx} +4 -2
- package/src/components/A11yOrder/A11yOrder.types.ts +11 -0
- package/src/components/A11yPaneTitle/A11yPaneTitle.tsx +13 -19
- package/src/components/A11yPaneTitle/A11yPaneTitle.types.ts +58 -0
- package/src/components/A11yView/A11yView.tsx +8 -63
- package/src/components/A11yView/A11yView.types.ts +11 -0
- package/src/index.ts +38 -20
- package/src/index.web.ts +7 -14
- package/src/modules/A11yAnnounceModule.android.ts +18 -2
- package/src/modules/A11yAnnounceModule.ts +153 -9
- package/{lib/module/nativeSpecs/A11yGroupNativeComponent.ts → src/nativeSpecs/A11yCardNativeComponent.ts} +3 -3
- package/src/nativeSpecs/A11yIndexNativeComponent.ts +11 -3
- package/src/nativeSpecs/NativeA11yAnnounceModule.ts +31 -1
- package/android/src/main/java/com/a11yorder/views/A11yGroupView/A11yGroupViewManager.java +0 -25
- package/android/src/main/java/com/a11yorder/views/A11yUIContainerView/A11yUIContainerViewManager.java +0 -30
- package/android/src/main/java/com/a11yorder/views/A11yView/A11yViewManager.java +0 -67
- package/android/src/newarch/A11yGroupViewManagerSpec.java +0 -9
- package/android/src/newarch/A11yUIContainerViewManagerSpec.java +0 -8
- package/android/src/newarch/A11yViewSpec.java +0 -13
- package/android/src/oldarch/A11yGroupViewManagerSpec.java +0 -8
- package/android/src/oldarch/A11yUIContainerViewManagerSpec.java +0 -9
- package/android/src/oldarch/A11yViewSpec.java +0 -18
- package/ios/views/RNAOA11yGroupView/RNAOA11yGroupView.h +0 -37
- package/ios/views/RNAOA11yGroupView/RNAOA11yGroupView.mm +0 -67
- package/ios/views/RNAOA11yGroupView/RNAOA11yGroupViewManager.h +0 -18
- package/ios/views/RNAOA11yGroupView/RNAOA11yGroupViewManager.mm +0 -25
- package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerView.h +0 -35
- package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerView.mm +0 -79
- package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerViewManager.h +0 -18
- package/ios/views/RNAOA11yUIContainerView/RNAOA11yUIContainerViewManager.mm +0 -27
- package/ios/views/RNAOA11yView/RNAOA11yView.h +0 -45
- package/ios/views/RNAOA11yView/RNAOA11yViewManager.h +0 -14
- package/ios/views/RNAOA11yView/RNAOA11yViewManager.mm +0 -53
- package/lib/commonjs/components/A11yGroup/A11yGroup.android.js +0 -18
- package/lib/commonjs/components/A11yGroup/A11yGroup.android.js.map +0 -1
- package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js +0 -24
- package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js.map +0 -1
- package/lib/commonjs/components/A11yGroup/A11yGroup.js +0 -9
- package/lib/commonjs/components/A11yGroup/A11yGroup.js.map +0 -1
- package/lib/commonjs/components/A11ySequence/A11ySequence.js.map +0 -1
- package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.ios.js +0 -22
- package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.ios.js.map +0 -1
- package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.js +0 -9
- package/lib/commonjs/components/A11yUIContainer/A11yUIContainer.js.map +0 -1
- package/lib/commonjs/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
- package/lib/commonjs/nativeSpecs/A11yViewNativeComponent.ts +0 -36
- package/lib/commonjs/types/A11yGroup.types.js.map +0 -1
- package/lib/commonjs/types/A11yIndex.types.js +0 -13
- package/lib/commonjs/types/A11yIndex.types.js.map +0 -1
- package/lib/commonjs/types/A11yLock.types.js.map +0 -1
- package/lib/commonjs/types/A11yModule.types.js.map +0 -1
- package/lib/commonjs/types/A11yUIContainerView.types.js +0 -15
- package/lib/commonjs/types/A11yUIContainerView.types.js.map +0 -1
- package/lib/commonjs/types/A11yView.types.js.map +0 -1
- package/lib/module/components/A11yGroup/A11yGroup.android.js +0 -12
- package/lib/module/components/A11yGroup/A11yGroup.android.js.map +0 -1
- package/lib/module/components/A11yGroup/A11yGroup.ios.js +0 -18
- package/lib/module/components/A11yGroup/A11yGroup.ios.js.map +0 -1
- package/lib/module/components/A11yGroup/A11yGroup.js +0 -5
- package/lib/module/components/A11yGroup/A11yGroup.js.map +0 -1
- package/lib/module/components/A11ySequence/A11ySequence.js.map +0 -1
- package/lib/module/components/A11yUIContainer/A11yUIContainer.ios.js +0 -17
- package/lib/module/components/A11yUIContainer/A11yUIContainer.ios.js.map +0 -1
- package/lib/module/components/A11yUIContainer/A11yUIContainer.js +0 -5
- package/lib/module/components/A11yUIContainer/A11yUIContainer.js.map +0 -1
- package/lib/module/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
- package/lib/module/nativeSpecs/A11yViewNativeComponent.ts +0 -36
- package/lib/module/types/A11yGroup.types.js +0 -4
- package/lib/module/types/A11yGroup.types.js.map +0 -1
- package/lib/module/types/A11yIndex.types.js +0 -9
- package/lib/module/types/A11yIndex.types.js.map +0 -1
- package/lib/module/types/A11yLock.types.js.map +0 -1
- package/lib/module/types/A11yModule.types.js +0 -4
- package/lib/module/types/A11yModule.types.js.map +0 -1
- package/lib/module/types/A11yUIContainerView.types.js +0 -11
- package/lib/module/types/A11yUIContainerView.types.js.map +0 -1
- package/lib/module/types/A11yView.types.js.map +0 -1
- package/lib/typescript/src/components/A11yGroup/A11yGroup.android.d.ts +0 -4
- package/lib/typescript/src/components/A11yGroup/A11yGroup.android.d.ts.map +0 -1
- package/lib/typescript/src/components/A11yGroup/A11yGroup.d.ts +0 -3
- package/lib/typescript/src/components/A11yGroup/A11yGroup.d.ts.map +0 -1
- package/lib/typescript/src/components/A11yGroup/A11yGroup.ios.d.ts +0 -4
- package/lib/typescript/src/components/A11yGroup/A11yGroup.ios.d.ts.map +0 -1
- package/lib/typescript/src/components/A11ySequence/A11ySequence.d.ts +0 -126
- package/lib/typescript/src/components/A11ySequence/A11ySequence.d.ts.map +0 -1
- package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.d.ts +0 -3
- package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.d.ts.map +0 -1
- package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.ios.d.ts +0 -4
- package/lib/typescript/src/components/A11yUIContainer/A11yUIContainer.ios.d.ts.map +0 -1
- package/lib/typescript/src/nativeSpecs/A11yGroupNativeComponent.d.ts +0 -8
- package/lib/typescript/src/nativeSpecs/A11yGroupNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/nativeSpecs/A11yUIContainerNativeComponent.d.ts +0 -10
- package/lib/typescript/src/nativeSpecs/A11yUIContainerNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/nativeSpecs/A11yViewNativeComponent.d.ts +0 -26
- package/lib/typescript/src/nativeSpecs/A11yViewNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yGroup.types.d.ts +0 -7
- package/lib/typescript/src/types/A11yGroup.types.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yIndex.types.d.ts +0 -19
- package/lib/typescript/src/types/A11yIndex.types.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yLock.types.d.ts +0 -8
- package/lib/typescript/src/types/A11yLock.types.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yModule.types.d.ts +0 -7
- package/lib/typescript/src/types/A11yModule.types.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yUIContainerView.types.d.ts +0 -13
- package/lib/typescript/src/types/A11yUIContainerView.types.d.ts.map +0 -1
- package/lib/typescript/src/types/A11yView.types.d.ts +0 -12
- package/lib/typescript/src/types/A11yView.types.d.ts.map +0 -1
- package/src/components/A11yGroup/A11yGroup.android.tsx +0 -8
- package/src/components/A11yGroup/A11yGroup.ios.tsx +0 -11
- package/src/components/A11yGroup/A11yGroup.tsx +0 -5
- package/src/components/A11yUIContainer/A11yUIContainer.ios.tsx +0 -20
- package/src/components/A11yUIContainer/A11yUIContainer.tsx +0 -5
- package/src/nativeSpecs/A11yUIContainerNativeComponent.ts +0 -12
- package/src/nativeSpecs/A11yViewNativeComponent.ts +0 -36
- package/src/types/A11yGroup.types.ts +0 -9
- package/src/types/A11yIndex.types.ts +0 -21
- package/src/types/A11yLock.types.ts +0 -8
- package/src/types/A11yModule.types.ts +0 -7
- package/src/types/A11yUIContainerView.types.ts +0 -15
- package/src/types/A11yView.types.ts +0 -19
- /package/lib/commonjs/{types → components/A11yLock}/A11yLock.types.js +0 -0
- /package/lib/commonjs/{types → components/A11yView}/A11yView.types.js +0 -0
- /package/lib/module/{types → components/A11yLock}/A11yLock.types.js +0 -0
- /package/lib/module/{types → components/A11yView}/A11yView.types.js +0 -0
|
@@ -1,211 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
// RNAOA11yView.m
|
|
3
|
-
// boost-boost_privacy
|
|
4
|
-
//
|
|
5
|
-
// Created by Artur Kalach on 17/08/2025.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
#import <UIKit/UIKit.h>
|
|
11
|
-
#import <React/RCTViewManager.h>
|
|
12
|
-
#import "RNAOA11yView.h"
|
|
13
|
-
#import "UIView+RNAOA11yOrder.h"
|
|
14
|
-
#import "RNAOScreenReaderFocusDelegate.h"
|
|
1
|
+
#import "RNAOA11yManagedFocusView.h"
|
|
15
2
|
#import "RNAOViewItemDelegate.h"
|
|
16
|
-
#import "RNAOA11yFocusService.h"
|
|
17
|
-
#import <React/UIView+React.h>
|
|
18
3
|
|
|
19
4
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
20
|
-
|
|
21
|
-
#include <string>
|
|
22
|
-
#import <react/renderer/components/RNA11yOrderSpec/ComponentDescriptors.h>
|
|
23
|
-
#import <react/renderer/components/RNA11yOrderSpec/EventEmitters.h>
|
|
24
|
-
#import <react/renderer/components/RNA11yOrderSpec/Props.h>
|
|
25
|
-
#import <react/renderer/components/RNA11yOrderSpec/RCTComponentViewHelpers.h>
|
|
26
|
-
#import "RCTFabricComponentsPlugins.h"
|
|
27
|
-
#import "RNAOPropsHelper.h"
|
|
28
5
|
#import "RNAOFabricEventHelper.h"
|
|
29
|
-
|
|
30
|
-
using namespace facebook::react;
|
|
31
|
-
|
|
32
|
-
@interface RNAOA11yView () <RCTA11yViewViewProtocol>
|
|
33
|
-
|
|
34
|
-
@end
|
|
35
|
-
|
|
36
6
|
#endif
|
|
37
7
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@implementation RNAOA11yView {
|
|
41
|
-
BOOL _needsAutoFocus;
|
|
42
|
-
RNAOViewItemDelegate* _viewDelegate;
|
|
8
|
+
@implementation RNAOA11yManagedFocusView {
|
|
43
9
|
BOOL _descendantFocusChangedEnabled;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- (void)setDescendantFocusChangedEnabled: (BOOL)descendantFocusChangedEnabled {
|
|
48
|
-
_descendantFocusChangedEnabled = descendantFocusChangedEnabled;
|
|
49
|
-
if (_descendantFocusChangedEnabled) {
|
|
50
|
-
if (self.superview) {
|
|
51
|
-
[[RNAOA11yFocusService sharedService] subscribe:self];
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
[[RNAOA11yFocusService sharedService] unsubscribe:self];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
- (BOOL)descendantFocusChangedEnabled {
|
|
59
|
-
return _descendantFocusChangedEnabled;
|
|
10
|
+
RNAOViewItemDelegate* _viewDelegate;
|
|
60
11
|
}
|
|
61
12
|
|
|
62
13
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
63
|
-
- (void)prepareForRecycle
|
|
64
|
-
{
|
|
65
|
-
[super prepareForRecycle];
|
|
66
|
-
_needsAutoFocus = YES;
|
|
67
|
-
_autoFocus = NO;
|
|
68
|
-
[_viewDelegate prepareForRecycle];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
72
|
-
{
|
|
73
|
-
return concreteComponentDescriptorProvider<A11yViewComponentDescriptor>();
|
|
74
|
-
}
|
|
75
14
|
|
|
76
|
-
- (
|
|
77
|
-
[super finalizeUpdates:updateMask];
|
|
78
|
-
[_viewDelegate finalizeUpdates];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
82
|
-
{
|
|
15
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
83
16
|
if (self = [super initWithFrame:frame]) {
|
|
84
|
-
static const auto defaultProps = std::make_shared<const A11yViewProps>();
|
|
85
|
-
_props = defaultProps;
|
|
86
|
-
_needsAutoFocus = YES;
|
|
87
17
|
_descendantFocusChangedEnabled = NO;
|
|
88
18
|
_viewDelegate = [[RNAOViewItemDelegate alloc] initWithView: self];
|
|
89
19
|
}
|
|
90
|
-
|
|
91
20
|
return self;
|
|
92
21
|
}
|
|
93
22
|
|
|
94
|
-
- (void)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const auto &newViewProps = *std::static_pointer_cast<A11yViewProps const>(props);
|
|
98
|
-
[super updateProps
|
|
99
|
-
:props oldProps:oldProps];
|
|
100
|
-
|
|
101
|
-
if (_autoFocus != newViewProps.autoFocus) {
|
|
102
|
-
[self setAutoFocus: newViewProps.autoFocus];
|
|
103
|
-
}
|
|
104
|
-
if (_descendantFocusChangedEnabled != newViewProps.descendantFocusChangedEnabled) {
|
|
105
|
-
[self setDescendantFocusChangedEnabled: newViewProps.descendantFocusChangedEnabled];
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args {
|
|
112
|
-
NSString *FOCUS = @"focus";
|
|
113
|
-
if([commandName isEqual:FOCUS]) {
|
|
114
|
-
[self focusView];
|
|
115
|
-
}
|
|
23
|
+
- (void)prepareForRecycle {
|
|
24
|
+
[super prepareForRecycle];
|
|
25
|
+
[_viewDelegate prepareForRecycle];
|
|
116
26
|
}
|
|
117
27
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
28
|
+
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
|
|
29
|
+
[super finalizeUpdates:updateMask];
|
|
30
|
+
[_viewDelegate finalizeUpdates];
|
|
121
31
|
}
|
|
122
32
|
|
|
123
33
|
#else
|
|
124
34
|
|
|
125
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
126
|
-
{
|
|
35
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
127
36
|
if (self = [super initWithFrame:frame]) {
|
|
128
|
-
_needsAutoFocus = YES;
|
|
129
37
|
_viewDelegate = [[RNAOViewItemDelegate alloc] initWithView: self];
|
|
130
38
|
}
|
|
131
|
-
|
|
132
39
|
return self;
|
|
133
40
|
}
|
|
134
41
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
139
|
-
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
140
|
-
[RNAOFabricEventHelper onA11yViewFocusChange:isFocused withEmitter:_eventEmitter];
|
|
141
|
-
}
|
|
142
|
-
#else
|
|
143
|
-
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
144
|
-
if (self.onScreenReaderFocusChange) {
|
|
145
|
-
self.onScreenReaderFocusChange(@{@"isFocused" : @(isFocused)});
|
|
146
|
-
}
|
|
42
|
+
- (void)layoutSubviews {
|
|
43
|
+
[super layoutSubviews];
|
|
44
|
+
[_viewDelegate layoutSubviews];
|
|
147
45
|
}
|
|
148
|
-
#endif
|
|
149
46
|
|
|
150
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
151
|
-
- (void)onScreenReaderDescendantFocusChangedHandler:(BOOL)isFocused withId:(NSString*) nativeId{
|
|
152
|
-
NSString* status = isFocused ? @"focused" : @"blurred";
|
|
153
|
-
[RNAOFabricEventHelper onA11yViewScreenReaderDescendantFocusChanged:status withId:nativeId withEmitter:_eventEmitter];
|
|
154
|
-
}
|
|
155
|
-
#else
|
|
156
|
-
- (void)onScreenReaderDescendantFocusChangedHandler:(BOOL)isFocused withId:(NSString*) nativeId{
|
|
157
|
-
if (self.onScreenReaderDescendantFocusChanged) {
|
|
158
|
-
NSString* status = isFocused ? @"focused" : @"blurred";
|
|
159
|
-
self.onScreenReaderDescendantFocusChanged(@{@"status": status, @"nativeId": nativeId});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
47
|
#endif
|
|
163
48
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
self.onScreenReaderFocused(@{});
|
|
49
|
+
- (void)setDescendantFocusChangedEnabled:(BOOL)descendantFocusChangedEnabled {
|
|
50
|
+
_descendantFocusChangedEnabled = descendantFocusChangedEnabled;
|
|
51
|
+
if (_descendantFocusChangedEnabled) {
|
|
52
|
+
if (self.superview) {
|
|
53
|
+
[[RNAOA11yFocusService sharedService] subscribe:self];
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
[[RNAOA11yFocusService sharedService] unsubscribe:self];
|
|
173
57
|
}
|
|
174
58
|
}
|
|
175
|
-
#endif
|
|
176
59
|
|
|
177
|
-
- (
|
|
178
|
-
|
|
179
|
-
[self onScreenReaderFocusedHandler];
|
|
60
|
+
- (BOOL)descendantFocusChangedEnabled {
|
|
61
|
+
return _descendantFocusChangedEnabled;
|
|
180
62
|
}
|
|
181
63
|
|
|
182
64
|
- (void)focusView {
|
|
183
65
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
184
66
|
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self);
|
|
185
67
|
});
|
|
186
|
-
|
|
187
68
|
}
|
|
188
69
|
|
|
189
70
|
- (void)focus {
|
|
190
71
|
[self focusView];
|
|
191
72
|
}
|
|
192
73
|
|
|
193
|
-
- (void)didMoveToWindow {
|
|
194
|
-
[super didMoveToWindow];
|
|
195
|
-
|
|
196
|
-
if (self.window) {
|
|
197
|
-
if(_needsAutoFocus && _autoFocus) {
|
|
198
|
-
_needsAutoFocus = NO;
|
|
199
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
200
|
-
[self focusView];
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
74
|
- (void)didMoveToSuperview {
|
|
207
75
|
[super didMoveToSuperview];
|
|
208
|
-
if (
|
|
76
|
+
if (_descendantFocusChangedEnabled && self.superview) {
|
|
209
77
|
[[RNAOA11yFocusService sharedService] subscribe:self];
|
|
210
78
|
}
|
|
211
79
|
}
|
|
@@ -215,9 +83,6 @@ Class<RCTComponentViewProtocol> A11yViewCls(void)
|
|
|
215
83
|
[super removeFromSuperview];
|
|
216
84
|
}
|
|
217
85
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
221
86
|
- (NSString*)getNativeId:(UIView*)element {
|
|
222
87
|
NSString* nativeId = nil;
|
|
223
88
|
@try {
|
|
@@ -225,14 +90,13 @@ Class<RCTComponentViewProtocol> A11yViewCls(void)
|
|
|
225
90
|
} @catch (NSException *exception) {
|
|
226
91
|
nativeId = nil;
|
|
227
92
|
}
|
|
228
|
-
|
|
229
93
|
return nativeId;
|
|
230
94
|
}
|
|
231
|
-
|
|
232
|
-
- (
|
|
233
|
-
|
|
95
|
+
|
|
96
|
+
- (void)accessibilityElementDidBecomeFocused {
|
|
97
|
+
[super accessibilityElementDidBecomeFocused];
|
|
98
|
+
[self onScreenReaderFocusedHandler];
|
|
234
99
|
}
|
|
235
|
-
#endif
|
|
236
100
|
|
|
237
101
|
- (void)accessibilityElementDidBecomeFocused:(UIView*)element {
|
|
238
102
|
NSString* nativeId = [self getNativeId: element];
|
|
@@ -244,34 +108,51 @@ Class<RCTComponentViewProtocol> A11yViewCls(void)
|
|
|
244
108
|
[self onScreenReaderDescendantFocusChangedHandler: false withId:nativeId];
|
|
245
109
|
}
|
|
246
110
|
|
|
247
|
-
|
|
248
|
-
- (void)
|
|
249
|
-
[
|
|
250
|
-
[_viewDelegate willRemoveSubview: subview];
|
|
111
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
112
|
+
- (void)onScreenReaderFocusedHandler {
|
|
113
|
+
[RNAOFabricEventHelper onA11yViewFocused: _eventEmitter];
|
|
251
114
|
}
|
|
252
|
-
|
|
253
|
-
- (void)
|
|
254
|
-
|
|
255
|
-
|
|
115
|
+
#else
|
|
116
|
+
- (void)onScreenReaderFocusedHandler {
|
|
117
|
+
if (self.onScreenReaderFocused) {
|
|
118
|
+
self.onScreenReaderFocused(@{});
|
|
119
|
+
}
|
|
256
120
|
}
|
|
121
|
+
#endif
|
|
257
122
|
|
|
258
|
-
#
|
|
259
|
-
- (void)
|
|
260
|
-
|
|
261
|
-
[
|
|
123
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
124
|
+
- (void)onScreenReaderDescendantFocusChangedHandler:(BOOL)isFocused withId:(NSString*)nativeId {
|
|
125
|
+
NSString* status = isFocused ? @"focused" : @"blurred";
|
|
126
|
+
[RNAOFabricEventHelper onA11yViewScreenReaderDescendantFocusChanged:status withId:nativeId withEmitter:_eventEmitter];
|
|
127
|
+
}
|
|
128
|
+
#else
|
|
129
|
+
- (void)onScreenReaderDescendantFocusChangedHandler:(BOOL)isFocused withId:(NSString*)nativeId {
|
|
130
|
+
if (self.onScreenReaderDescendantFocusChanged) {
|
|
131
|
+
NSString* status = isFocused ? @"focused" : @"blurred";
|
|
132
|
+
self.onScreenReaderDescendantFocusChanged(@{@"status": status, @"nativeId": nativeId});
|
|
133
|
+
}
|
|
262
134
|
}
|
|
263
135
|
#endif
|
|
264
136
|
|
|
265
|
-
|
|
266
|
-
|
|
137
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
138
|
+
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
139
|
+
[RNAOFabricEventHelper onA11yViewFocusChange:isFocused withEmitter:_eventEmitter];
|
|
140
|
+
}
|
|
141
|
+
#else
|
|
142
|
+
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
143
|
+
if (self.onScreenReaderFocusChange) {
|
|
144
|
+
self.onScreenReaderFocusChange(@{@"isFocused" : @(isFocused)});
|
|
145
|
+
}
|
|
267
146
|
}
|
|
147
|
+
#endif
|
|
268
148
|
|
|
269
|
-
- (void)
|
|
270
|
-
[
|
|
149
|
+
- (void)onChildAttached:(UIView*)child {
|
|
150
|
+
[_viewDelegate didAddSubview: child];
|
|
271
151
|
}
|
|
272
152
|
|
|
273
|
-
- (void)
|
|
274
|
-
[
|
|
153
|
+
- (void)willRemoveSubview:(UIView *)subview {
|
|
154
|
+
[super willRemoveSubview:subview];
|
|
155
|
+
[_viewDelegate willRemoveSubview: subview];
|
|
275
156
|
}
|
|
276
157
|
|
|
277
158
|
@end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#ifndef RNAOA11yScreenReaderView_h
|
|
2
|
+
#define RNAOA11yScreenReaderView_h
|
|
3
|
+
|
|
4
|
+
#import "RNAOA11yViewGroup.h"
|
|
5
|
+
#import "RNAOScreenReaderFocusDelegate.h"
|
|
6
|
+
#import "RNAOViewItemProtocol.h"
|
|
7
|
+
|
|
8
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
9
|
+
|
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
11
|
+
|
|
12
|
+
@interface RNAOA11yScreenReaderView : RNAOA11yViewGroup<RNAOScreenReaderFocusDelegate, RNAOViewItemProtocol>
|
|
13
|
+
@end
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_END
|
|
16
|
+
|
|
17
|
+
#else
|
|
18
|
+
|
|
19
|
+
@interface RNAOA11yScreenReaderView : RNAOA11yViewGroup<RNAOScreenReaderFocusDelegate, RNAOViewItemProtocol>
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
#endif /* RNAOA11yScreenReaderView_h */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#import "RNAOA11yScreenReaderView.h"
|
|
2
|
+
#import "UIView+RNAOA11yOrder.h"
|
|
3
|
+
|
|
4
|
+
@implementation RNAOA11yScreenReaderView
|
|
5
|
+
|
|
6
|
+
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {}
|
|
7
|
+
|
|
8
|
+
- (void)onFocusItemLinked:(UIView *)view {
|
|
9
|
+
[view setScreenReaderFocusDelegate: self];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
- (void)onFocusItemRemoved:(UIView *)view {
|
|
13
|
+
[view clearScreenReaderFocusDelegate];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
- (void)onScreenReaderFocusChanged:(BOOL)focused {
|
|
17
|
+
[self onScreenReaderFocusChangeHandler: focused];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
21
|
+
- (void)focusView {
|
|
22
|
+
UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, self);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args {
|
|
26
|
+
if ([commandName isEqual:@"focus"]) {
|
|
27
|
+
[self focusView];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
@end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#ifndef RNAOA11yViewGroup_h
|
|
2
|
+
#define RNAOA11yViewGroup_h
|
|
3
|
+
|
|
4
|
+
#import <UIKit/UIKit.h>
|
|
5
|
+
|
|
6
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
7
|
+
#import <React/RCTViewComponentView.h>
|
|
8
|
+
|
|
9
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
10
|
+
|
|
11
|
+
@interface RNAOA11yViewGroup : RCTViewComponentView
|
|
12
|
+
|
|
13
|
+
- (nullable UIView*)getSubChild;
|
|
14
|
+
- (void)onChildAttached:(UIView*)child;
|
|
15
|
+
- (void)onChildRemoved;
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
20
|
+
|
|
21
|
+
#else
|
|
22
|
+
|
|
23
|
+
#import <React/RCTView.h>
|
|
24
|
+
|
|
25
|
+
@interface RNAOA11yViewGroup : RCTView
|
|
26
|
+
|
|
27
|
+
- (nullable UIView*)getSubChild;
|
|
28
|
+
- (void)onChildAttached:(UIView*)child;
|
|
29
|
+
- (void)onChildRemoved;
|
|
30
|
+
|
|
31
|
+
@end
|
|
32
|
+
|
|
33
|
+
#endif
|
|
34
|
+
|
|
35
|
+
#endif /* RNAOA11yViewGroup_h */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#import "RNAOA11yViewGroup.h"
|
|
2
|
+
|
|
3
|
+
@implementation RNAOA11yViewGroup {
|
|
4
|
+
__weak UIView* _subChild;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
- (nullable UIView*)getSubChild {
|
|
8
|
+
return _subChild;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
- (void)onChildAttached:(UIView*)child {}
|
|
12
|
+
- (void)onChildRemoved {}
|
|
13
|
+
|
|
14
|
+
- (void)setSubChildInternal:(nullable UIView*)child {
|
|
15
|
+
_subChild = child;
|
|
16
|
+
if (child != nil) {
|
|
17
|
+
[self onChildAttached: child];
|
|
18
|
+
} else {
|
|
19
|
+
[self onChildRemoved];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (void)didAddSubview:(UIView *)subview {
|
|
24
|
+
[super didAddSubview:subview];
|
|
25
|
+
if (_subChild == nil) {
|
|
26
|
+
[self setSubChildInternal: subview];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
- (void)willRemoveSubview:(UIView *)subview {
|
|
31
|
+
[super willRemoveSubview:subview];
|
|
32
|
+
if (_subChild == subview) {
|
|
33
|
+
[self setSubChildInternal: nil];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
- (void)didMoveToWindow {
|
|
38
|
+
[super didMoveToWindow];
|
|
39
|
+
if (self.window == nil) {
|
|
40
|
+
[self setSubChildInternal: nil];
|
|
41
|
+
} else if (_subChild == nil && self.subviews.count > 0) {
|
|
42
|
+
[self setSubChildInternal: self.subviews[0]];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#ifndef RNAOA11yViewOrder_h
|
|
2
|
+
#define RNAOA11yViewOrder_h
|
|
3
|
+
|
|
4
|
+
#import "RNAOA11yManagedFocusView.h"
|
|
5
|
+
|
|
6
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
7
|
+
|
|
8
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
+
|
|
10
|
+
@interface RNAOA11yViewOrder : RNAOA11yManagedFocusView
|
|
11
|
+
|
|
12
|
+
- (void)setPosition:(NSNumber*)position;
|
|
13
|
+
- (void)setOrderKey:(NSString *)orderKey;
|
|
14
|
+
- (void)setOrderFocusType:(NSNumber *)orderFocusType;
|
|
15
|
+
|
|
16
|
+
- (nullable NSNumber*)delegatePosition;
|
|
17
|
+
- (nullable NSString*)delegateOrderKey;
|
|
18
|
+
- (nullable NSNumber*)delegateOrderFocusType;
|
|
19
|
+
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
NS_ASSUME_NONNULL_END
|
|
23
|
+
|
|
24
|
+
#else
|
|
25
|
+
|
|
26
|
+
@interface RNAOA11yViewOrder : RNAOA11yManagedFocusView
|
|
27
|
+
|
|
28
|
+
- (void)setPosition:(NSNumber*)position;
|
|
29
|
+
- (void)setOrderKey:(NSString *)orderKey;
|
|
30
|
+
- (void)setOrderFocusType:(NSNumber *)orderFocusType;
|
|
31
|
+
|
|
32
|
+
- (nullable NSNumber*)delegatePosition;
|
|
33
|
+
- (nullable NSString*)delegateOrderKey;
|
|
34
|
+
- (nullable NSNumber*)delegateOrderFocusType;
|
|
35
|
+
|
|
36
|
+
@end
|
|
37
|
+
|
|
38
|
+
#endif
|
|
39
|
+
|
|
40
|
+
#endif /* RNAOA11yViewOrder_h */
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#import "RNAOA11yViewOrder.h"
|
|
2
|
+
#import "RNAOA11yItemDelegate.h"
|
|
3
|
+
|
|
4
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
5
|
+
#import "RNAOFabricEventHelper.h"
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
@implementation RNAOA11yViewOrder {
|
|
9
|
+
RNAOA11yItemDelegate* _a11yItemDelegate;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
13
|
+
|
|
14
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
15
|
+
if (self = [super initWithFrame:frame]) {
|
|
16
|
+
_a11yItemDelegate = [[RNAOA11yItemDelegate alloc] initWithView: self];
|
|
17
|
+
}
|
|
18
|
+
return self;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
|
|
22
|
+
[super finalizeUpdates:updateMask];
|
|
23
|
+
[_a11yItemDelegate finalizeUpdates];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
- (void)prepareForRecycle {
|
|
27
|
+
[_a11yItemDelegate clear];
|
|
28
|
+
[super prepareForRecycle];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#else
|
|
32
|
+
|
|
33
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
34
|
+
if (self = [super initWithFrame:frame]) {
|
|
35
|
+
_a11yItemDelegate = [[RNAOA11yItemDelegate alloc] initWithView: self];
|
|
36
|
+
}
|
|
37
|
+
return self;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
- (void)layoutSubviews {
|
|
41
|
+
[super layoutSubviews];
|
|
42
|
+
[_a11yItemDelegate finalizeUpdates];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
- (void)setPosition:(NSNumber*)position {
|
|
48
|
+
[_a11yItemDelegate setPosition: position];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
- (void)setOrderKey:(NSString *)orderKey {
|
|
52
|
+
[_a11yItemDelegate setOrderKey: orderKey];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void)setOrderFocusType:(NSNumber *)orderFocusType {
|
|
56
|
+
[_a11yItemDelegate setOrderFocusType: orderFocusType];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
- (nullable NSNumber*)delegatePosition {
|
|
60
|
+
return _a11yItemDelegate.position;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
- (nullable NSString*)delegateOrderKey {
|
|
64
|
+
return _a11yItemDelegate.orderKey;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
- (nullable NSNumber*)delegateOrderFocusType {
|
|
68
|
+
return _a11yItemDelegate.orderFocusType;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
- (void)onChildAttached:(UIView*)child {
|
|
72
|
+
[_a11yItemDelegate didAddSubview: child];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
- (void)willRemoveSubview:(UIView *)subview {
|
|
76
|
+
[super willRemoveSubview:subview];
|
|
77
|
+
[_a11yItemDelegate willRemoveSubview: subview];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
81
|
+
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
82
|
+
[RNAOFabricEventHelper onIndexViewFocusChange:isFocused withEmitter:_eventEmitter];
|
|
83
|
+
}
|
|
84
|
+
#else
|
|
85
|
+
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
86
|
+
if (self.onScreenReaderFocusChange) {
|
|
87
|
+
self.onScreenReaderFocusChange(@{@"isFocused" : @(isFocused)});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
@end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.A11yCard = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _A11yCardNativeComponent = _interopRequireDefault(require("../../nativeSpecs/A11yCardNativeComponent"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const A11yCard = ({
|
|
13
|
+
containerProps,
|
|
14
|
+
style,
|
|
15
|
+
testID,
|
|
16
|
+
onPress,
|
|
17
|
+
accessibility,
|
|
18
|
+
pressableProps,
|
|
19
|
+
children
|
|
20
|
+
}) => {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_A11yCardNativeComponent.default, {
|
|
22
|
+
...containerProps,
|
|
23
|
+
style: [styles.container, containerProps?.style],
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
25
|
+
testID: `${testID}-overlay`,
|
|
26
|
+
accessibilityRole: "button",
|
|
27
|
+
...accessibility,
|
|
28
|
+
accessible: true,
|
|
29
|
+
pointerEvents: "none",
|
|
30
|
+
onAccessibilityTap: onPress,
|
|
31
|
+
style: styles.overlay
|
|
32
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
33
|
+
...pressableProps,
|
|
34
|
+
accessible: false,
|
|
35
|
+
onPress: onPress,
|
|
36
|
+
testID: testID,
|
|
37
|
+
style: style,
|
|
38
|
+
children: children
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.A11yCard = A11yCard;
|
|
43
|
+
const styles = _reactNative.StyleSheet.create({
|
|
44
|
+
container: {
|
|
45
|
+
position: 'relative'
|
|
46
|
+
},
|
|
47
|
+
overlay: _reactNative.StyleSheet.absoluteFillObject
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=A11yCard.ios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_A11yCardNativeComponent","_jsxRuntime","e","__esModule","default","A11yCard","containerProps","style","testID","onPress","accessibility","pressableProps","children","jsxs","styles","container","jsx","View","accessibilityRole","accessible","pointerEvents","onAccessibilityTap","overlay","Pressable","exports","StyleSheet","create","position","absoluteFillObject"],"sourceRoot":"../../../../src","sources":["components/A11yCard/A11yCard.ios.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA6D,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKtD,MAAMG,QAAQ,GAAGA,CAAC;EACvBC,cAAc;EACdC,KAAK;EACLC,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,cAAc;EACdC;AACa,CAAC,KAAK;EACnB,oBACE,IAAAX,WAAA,CAAAY,IAAA,EAACb,wBAAA,CAAAI,OAAI;IAAA,GAAKE,cAAc;IAAEC,KAAK,EAAE,CAACO,MAAM,CAACC,SAAS,EAAET,cAAc,EAAEC,KAAK,CAAE;IAAAK,QAAA,gBACzE,IAAAX,WAAA,CAAAe,GAAA,EAACjB,YAAA,CAAAkB,IAAI;MACHT,MAAM,EAAE,GAAGA,MAAM,UAAW;MAC5BU,iBAAiB,EAAC,QAAQ;MAAA,GACtBR,aAAa;MACjBS,UAAU;MACVC,aAAa,EAAC,MAAM;MACpBC,kBAAkB,EAAEZ,OAAQ;MAC5BF,KAAK,EAAEO,MAAM,CAACQ;IAAQ,CACvB,CAAC,eACF,IAAArB,WAAA,CAAAe,GAAA,EAACjB,YAAA,CAAAwB,SAAS;MAAA,GACJZ,cAAc;MAClBQ,UAAU,EAAE,KAAM;MAClBV,OAAO,EAAEA,OAAQ;MACjBD,MAAM,EAAEA,MAAO;MACfD,KAAK,EAAEA,KAAM;MAAAK,QAAA,EAEZA;IAAQ,CACA,CAAC;EAAA,CACR,CAAC;AAEX,CAAC;AAACY,OAAA,CAAAnB,QAAA,GAAAA,QAAA;AAEF,MAAMS,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IAAEY,QAAQ,EAAE;EAAW,CAAC;EACnCL,OAAO,EAAEG,uBAAU,CAACG;AACtB,CAAC,CAAC","ignoreList":[]}
|