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
|
@@ -13,99 +13,103 @@
|
|
|
13
13
|
#import "RNAOA11yAnnounceHelper.h"
|
|
14
14
|
|
|
15
15
|
@interface RNAOA11yAnnounceService ()
|
|
16
|
-
|
|
17
|
-
//@property (nonatomic, copy) void (^debounceBlock)(void);
|
|
18
|
-
|
|
19
16
|
@property (nonatomic, assign) BOOL isVoiceOverNulled;
|
|
20
17
|
@property (nonatomic, assign) BOOL isAnnounceLocked;
|
|
21
|
-
|
|
22
18
|
@property (nonatomic, strong) RNAODebouncer *announceDebouncer;
|
|
23
19
|
@property (nonatomic, strong) RNAODebouncer *lockReleaseDebouncer;
|
|
24
|
-
|
|
25
20
|
@property (nonatomic, strong) RNAOA11yAnnounceQueue *announceQueue;
|
|
26
|
-
@property (
|
|
27
|
-
|
|
21
|
+
@property (nonatomic, strong) RNAOFocusChangeListener *voiceOverFocusListener;
|
|
22
|
+
// One callback per announce:onFired: call (FIFO). Fired when the batch posts.
|
|
23
|
+
// Dropped without calling on cancelAll — module resolves those promises as 'cancelled'.
|
|
24
|
+
@property (nonatomic, strong) NSMutableArray<dispatch_block_t> *onFiredCallbacks;
|
|
28
25
|
@property (nonatomic, assign, readonly) BOOL canAnnounce;
|
|
29
|
-
|
|
30
26
|
@end
|
|
31
27
|
|
|
32
28
|
@implementation RNAOA11yAnnounceService
|
|
33
29
|
|
|
34
30
|
#pragma mark - Singleton
|
|
31
|
+
|
|
35
32
|
+ (instancetype)shared {
|
|
36
|
-
static RNAOA11yAnnounceService *
|
|
33
|
+
static RNAOA11yAnnounceService *instance = nil;
|
|
37
34
|
static dispatch_once_t onceToken;
|
|
38
|
-
dispatch_once(&onceToken, ^{
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
return sharedInstance;
|
|
35
|
+
dispatch_once(&onceToken, ^{ instance = [self new]; });
|
|
36
|
+
return instance;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
- (instancetype)init {
|
|
45
|
-
if (self) {
|
|
46
|
-
_isVoiceOverNulled
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
self.voiceOverFocusListener = [[RNAOFocusChangeListener alloc] initWithDelegate: self];
|
|
54
|
-
[self.voiceOverFocusListener startListening];
|
|
40
|
+
if (self = [super init]) {
|
|
41
|
+
_isVoiceOverNulled = YES;
|
|
42
|
+
_announceDebouncer = [[RNAODebouncer alloc] initWithInterval:0.3];
|
|
43
|
+
_lockReleaseDebouncer = [[RNAODebouncer alloc] initWithInterval:1.0];
|
|
44
|
+
_announceQueue = [RNAOA11yAnnounceQueue new];
|
|
45
|
+
_onFiredCallbacks = [NSMutableArray new];
|
|
46
|
+
_voiceOverFocusListener = [[RNAOFocusChangeListener alloc] initWithDelegate:self];
|
|
47
|
+
[_voiceOverFocusListener startListening];
|
|
55
48
|
}
|
|
56
49
|
return self;
|
|
57
50
|
}
|
|
58
51
|
|
|
59
|
-
- (void)dealloc {
|
|
60
|
-
[self.voiceOverFocusListener stopListening];
|
|
61
|
-
}
|
|
52
|
+
- (void)dealloc { [_voiceOverFocusListener stopListening]; }
|
|
62
53
|
|
|
63
54
|
- (BOOL)canAnnounce {
|
|
64
55
|
return !self.announceQueue.isEmpty && !self.isAnnounceLocked && !self.isVoiceOverNulled;
|
|
65
56
|
}
|
|
66
57
|
|
|
58
|
+
#pragma mark - Focus delegate
|
|
59
|
+
|
|
67
60
|
- (void)voiceOverFocusChanged:(id)focusedElement {
|
|
68
61
|
self.isVoiceOverNulled = (focusedElement == nil);
|
|
69
|
-
|
|
70
|
-
[self delayedAnnounce];
|
|
62
|
+
[self _scheduleAnnounce];
|
|
71
63
|
}
|
|
72
64
|
|
|
65
|
+
#pragma mark - Lock
|
|
66
|
+
|
|
73
67
|
- (void)temporarilyLockAnnounce {
|
|
74
|
-
|
|
75
|
-
[self.lockReleaseDebouncer debounceAction:^{
|
|
76
|
-
self.isAnnounceLocked = NO;
|
|
77
|
-
[self delayedAnnounce];
|
|
78
|
-
}];
|
|
68
|
+
[self temporarilyLockAnnounce:1.0];
|
|
79
69
|
}
|
|
80
70
|
|
|
81
71
|
- (void)temporarilyLockAnnounce:(NSTimeInterval)interval {
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
self.isAnnounceLocked = YES;
|
|
73
|
+
// Interval must be set before debounceAction: — it is read at call time.
|
|
74
|
+
self.lockReleaseDebouncer.debounceInterval = interval;
|
|
75
|
+
__weak RNAOA11yAnnounceService *weakSelf = self;
|
|
76
|
+
[self.lockReleaseDebouncer debounceAction:^{
|
|
77
|
+
weakSelf.isAnnounceLocked = NO;
|
|
78
|
+
[weakSelf _scheduleAnnounce];
|
|
79
|
+
}];
|
|
84
80
|
}
|
|
85
81
|
|
|
86
|
-
|
|
87
82
|
#pragma mark - Announce
|
|
83
|
+
|
|
88
84
|
- (void)announce:(NSString *)announcement {
|
|
89
|
-
[self
|
|
90
|
-
|
|
91
|
-
[self delayedAnnounce];
|
|
85
|
+
[self announce:announcement onFired:nil];
|
|
92
86
|
}
|
|
93
87
|
|
|
94
|
-
- (void)
|
|
95
|
-
|
|
88
|
+
- (void)announce:(NSString *)announcement onFired:(nullable dispatch_block_t)onFired {
|
|
89
|
+
[self.announceQueue add:announcement];
|
|
90
|
+
if (onFired) [self.onFiredCallbacks addObject:onFired];
|
|
91
|
+
[self _scheduleAnnounce];
|
|
92
|
+
}
|
|
96
93
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
- (void)cancelAll {
|
|
95
|
+
[self.announceQueue clear];
|
|
96
|
+
[self.onFiredCallbacks removeAllObjects];
|
|
100
97
|
}
|
|
101
98
|
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
#pragma mark - Private
|
|
100
|
+
|
|
101
|
+
- (void)_scheduleAnnounce {
|
|
102
|
+
if (!self.canAnnounce) return;
|
|
103
|
+
__weak RNAOA11yAnnounceService *weakSelf = self;
|
|
104
|
+
[self.announceDebouncer debounceAction:^{ [weakSelf _announceNow]; }];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
- (void)_announceNow {
|
|
108
|
+
if (!self.canAnnounce) return;
|
|
109
|
+
[RNAOA11yAnnounceHelper announceWithList:self.announceQueue.list];
|
|
110
|
+
[self.announceQueue clear];
|
|
111
|
+
for (dispatch_block_t cb in self.onFiredCallbacks.copy) { cb(); }
|
|
112
|
+
[self.onFiredCallbacks removeAllObjects];
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
@end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNAOA11yCardView.h
|
|
3
|
+
// react-native-a11y-order
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#ifndef RNAOA11yCardView_h
|
|
7
|
+
#define RNAOA11yCardView_h
|
|
8
|
+
|
|
9
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
|
+
|
|
11
|
+
#import <React/RCTViewComponentView.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
@interface RNAOA11yCardView : RCTViewComponentView
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
19
|
+
|
|
20
|
+
#else
|
|
21
|
+
|
|
22
|
+
#import <React/RCTView.h>
|
|
23
|
+
|
|
24
|
+
@interface RNAOA11yCardView : RCTView
|
|
25
|
+
@end
|
|
26
|
+
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
#endif /* RNAOA11yCardView_h */
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNAOA11yCardView.mm
|
|
3
|
+
// react-native-a11y-order
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#import "RNAOA11yCardView.h"
|
|
7
|
+
|
|
8
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
9
|
+
|
|
10
|
+
#import <react/renderer/components/RNA11yOrderSpec/ComponentDescriptors.h>
|
|
11
|
+
#import <react/renderer/components/RNA11yOrderSpec/RCTComponentViewHelpers.h>
|
|
12
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
13
|
+
|
|
14
|
+
using namespace facebook::react;
|
|
15
|
+
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
@implementation RNAOA11yCardView {
|
|
19
|
+
UIFocusGuide *_contentFocusGuide;
|
|
20
|
+
NSString *_overlayFocusGroupIdentifier;
|
|
21
|
+
NSString *_contentFocusGroupIdentifier;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
- (nullable NSArray *)accessibilityElements {
|
|
25
|
+
return self.subviews;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (void)willRemoveSubview:(UIView *)subview {
|
|
29
|
+
[super willRemoveSubview:subview];
|
|
30
|
+
if (@available(iOS 15.0, *)) {
|
|
31
|
+
NSString *identifier = subview.focusGroupIdentifier;
|
|
32
|
+
if ([identifier isEqualToString:_overlayFocusGroupIdentifier] ||
|
|
33
|
+
[identifier isEqualToString:_contentFocusGroupIdentifier]) {
|
|
34
|
+
subview.focusGroupIdentifier = nil;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
- (void)assignFocusGroupIdentifierToChild:(UIView *)child atIndex:(NSInteger)index {
|
|
40
|
+
if (@available(iOS 15.0, *)) {
|
|
41
|
+
if (!_overlayFocusGroupIdentifier) {
|
|
42
|
+
_overlayFocusGroupIdentifier =
|
|
43
|
+
[NSString stringWithFormat:@"RNAOA11yCard-%p-overlay", self];
|
|
44
|
+
_contentFocusGroupIdentifier =
|
|
45
|
+
[NSString stringWithFormat:@"RNAOA11yCard-%p-content", self];
|
|
46
|
+
}
|
|
47
|
+
if (index == 0) {
|
|
48
|
+
child.focusGroupIdentifier = _overlayFocusGroupIdentifier;
|
|
49
|
+
} else if (index == 1) {
|
|
50
|
+
child.focusGroupIdentifier = _contentFocusGroupIdentifier;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
56
|
+
|
|
57
|
+
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView
|
|
58
|
+
index:(NSInteger)index {
|
|
59
|
+
[super mountChildComponentView:childComponentView index:index];
|
|
60
|
+
[self assignFocusGroupIdentifierToChild:childComponentView atIndex:index];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
64
|
+
return concreteComponentDescriptorProvider<A11yCardViewComponentDescriptor>();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Class<RCTComponentViewProtocol> A11yCardViewCls(void) {
|
|
68
|
+
return RNAOA11yCardView.class;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
#else
|
|
72
|
+
|
|
73
|
+
- (void)didAddSubview:(UIView *)subview {
|
|
74
|
+
[super didAddSubview:subview];
|
|
75
|
+
NSUInteger index = [self.subviews indexOfObject:subview];
|
|
76
|
+
if (index != NSNotFound) {
|
|
77
|
+
[self assignFocusGroupIdentifierToChild:subview atIndex:(NSInteger)index];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#endif
|
|
82
|
+
|
|
83
|
+
@end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNAOA11yCardViewManager.h
|
|
3
|
+
// react-native-a11y-order
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#ifndef RNAOA11yCardViewManager_h
|
|
7
|
+
#define RNAOA11yCardViewManager_h
|
|
8
|
+
|
|
9
|
+
#import <React/RCTViewManager.h>
|
|
10
|
+
|
|
11
|
+
@interface RNAOA11yCardViewManager : RCTViewManager
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
#endif /* RNAOA11yCardViewManager_h */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNAOA11yCardViewManager.mm
|
|
3
|
+
// react-native-a11y-order
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
#import "RNAOA11yCardView.h"
|
|
7
|
+
#import "RNAOA11yCardViewManager.h"
|
|
8
|
+
|
|
9
|
+
@implementation RNAOA11yCardViewManager
|
|
10
|
+
|
|
11
|
+
RCT_EXPORT_MODULE(A11yCardView)
|
|
12
|
+
|
|
13
|
+
- (UIView *)view {
|
|
14
|
+
return [[RNAOA11yCardView alloc] init];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@end
|
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RNAOA11yIndexView.h
|
|
3
|
-
// A11yOrder
|
|
4
|
-
//
|
|
5
|
-
// Created by Artur Kalach on 13/07/2024.
|
|
6
|
-
// Copyright © 2024 Facebook. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
1
|
#ifndef RNAOA11yIndexView_h
|
|
10
2
|
#define RNAOA11yIndexView_h
|
|
11
3
|
|
|
12
|
-
#import
|
|
13
|
-
#import <React/RCTUITextField.h>
|
|
14
|
-
#import "RNAOScreenReaderFocusDelegate.h"
|
|
15
|
-
#import "RNAOViewItemProtocol.h"
|
|
16
|
-
|
|
17
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
18
|
-
#import <React/RCTViewComponentView.h>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
22
|
-
|
|
23
|
-
@interface RNAOA11yIndexView : RCTViewComponentView<RNAOScreenReaderFocusDelegate, RNAOViewItemProtocol>
|
|
24
|
-
|
|
25
|
-
- (void)setPosition: (NSNumber*)position;
|
|
26
|
-
- (void)setOrderKey:(NSString *)orderKey;
|
|
27
|
-
- (void)setOrderFocusType:(NSNumber *)orderFocusType;
|
|
28
|
-
|
|
29
|
-
@end
|
|
30
|
-
|
|
31
|
-
NS_ASSUME_NONNULL_END
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#else /* RCT_NEW_ARCH_ENABLED */
|
|
4
|
+
#import "RNAOA11yViewOrder.h"
|
|
35
5
|
|
|
36
|
-
|
|
37
|
-
#import <React/RCTView.h>
|
|
38
|
-
@interface RNAOA11yIndexView : RCTView<RNAOScreenReaderFocusDelegate, RNAOViewItemProtocol>
|
|
39
|
-
|
|
40
|
-
- (void)setPosition: (NSNumber*)position;
|
|
41
|
-
- (void)setOrderKey:(NSString *)orderKey;
|
|
42
|
-
- (void)setOrderFocusType:(NSNumber *)orderFocusType;
|
|
43
|
-
@property (nonatomic, copy) RCTDirectEventBlock onScreenReaderFocusChange;
|
|
6
|
+
@interface RNAOA11yIndexView : RNAOA11yViewOrder
|
|
44
7
|
@end
|
|
45
8
|
|
|
46
|
-
|
|
47
|
-
#endif /* RCT_NEW_ARCH_ENABLED */
|
|
48
9
|
#endif /* RNAOA11yIndexView_h */
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
//
|
|
2
|
-
// RNAOA11yIndexView.m
|
|
3
|
-
// A11yOrder
|
|
4
|
-
//
|
|
5
|
-
// Created by Artur Kalach on 13/07/2024.
|
|
6
|
-
// Copyright © 2024 Facebook. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
1
|
#import "RNAOA11yIndexView.h"
|
|
12
|
-
#import <UIKit/UIKit.h>
|
|
13
|
-
#import <React/RCTViewManager.h>
|
|
14
|
-
#import "RNAOA11yOrderLinking.h"
|
|
15
|
-
#import "RNAOA11yItemDelegate.h"
|
|
16
|
-
#import "UIView+RNAOA11yOrder.h"
|
|
17
|
-
#import "RNAOFabricEventHelper.h"
|
|
18
2
|
|
|
19
3
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
20
4
|
|
|
@@ -23,154 +7,66 @@
|
|
|
23
7
|
#import <react/renderer/components/RNA11yOrderSpec/EventEmitters.h>
|
|
24
8
|
#import <react/renderer/components/RNA11yOrderSpec/Props.h>
|
|
25
9
|
#import <react/renderer/components/RNA11yOrderSpec/RCTComponentViewHelpers.h>
|
|
26
|
-
|
|
27
10
|
#import "RCTFabricComponentsPlugins.h"
|
|
28
11
|
|
|
29
12
|
using namespace facebook::react;
|
|
30
13
|
|
|
31
14
|
@interface RNAOA11yIndexView () <RCTA11yIndexViewViewProtocol>
|
|
32
|
-
|
|
33
15
|
@end
|
|
34
16
|
|
|
35
17
|
#endif
|
|
36
18
|
|
|
37
|
-
@implementation RNAOA11yIndexView
|
|
38
|
-
RNAOA11yItemDelegate* _a11yItemDelegate;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
- (void)didAddSubview:(UIView *)subview {
|
|
42
|
-
[super didAddSubview:subview];
|
|
43
|
-
[_a11yItemDelegate didAddSubview:subview];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#ifndef RCT_NEW_ARCH_ENABLED
|
|
47
|
-
- (void)layoutSubviews {
|
|
48
|
-
[super layoutSubviews];
|
|
49
|
-
[_a11yItemDelegate finalizeUpdates];
|
|
50
|
-
}
|
|
51
|
-
#endif
|
|
52
|
-
|
|
53
|
-
- (void)willRemoveSubview:(UIView *)subview {
|
|
54
|
-
[super willRemoveSubview:subview];
|
|
55
|
-
[_a11yItemDelegate willRemoveSubview: subview];
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
- (void)setPosition: (NSNumber*)position {
|
|
59
|
-
[_a11yItemDelegate setPosition: position];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
- (void)setOrderKey:(NSString *)orderKey {
|
|
63
|
-
[_a11yItemDelegate setOrderKey:orderKey];
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
- (void)setOrderFocusType:(NSNumber *)orderFocusType {
|
|
67
|
-
[_a11yItemDelegate setOrderFocusType: orderFocusType];
|
|
68
|
-
}
|
|
19
|
+
@implementation RNAOA11yIndexView
|
|
69
20
|
|
|
70
21
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
71
|
-
|
|
72
|
-
{
|
|
22
|
+
|
|
23
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
73
24
|
if (self = [super initWithFrame:frame]) {
|
|
74
25
|
static const auto defaultProps = std::make_shared<const A11yIndexViewProps>();
|
|
75
26
|
_props = defaultProps;
|
|
76
|
-
_a11yItemDelegate = [[RNAOA11yItemDelegate alloc] initWithView: self];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return self;
|
|
80
|
-
}
|
|
81
|
-
#else
|
|
82
|
-
- (instancetype)initWithFrame:(CGRect)frame
|
|
83
|
-
{
|
|
84
|
-
if (self = [super initWithFrame:frame]) {
|
|
85
|
-
_a11yItemDelegate = [[RNAOA11yItemDelegate alloc] initWithView: self];
|
|
86
27
|
}
|
|
87
|
-
|
|
88
28
|
return self;
|
|
89
29
|
}
|
|
90
|
-
#endif
|
|
91
30
|
|
|
92
|
-
|
|
93
|
-
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
94
|
-
{
|
|
31
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
95
32
|
return concreteComponentDescriptorProvider<A11yIndexViewComponentDescriptor>();
|
|
96
33
|
}
|
|
97
34
|
|
|
98
|
-
|
|
99
|
-
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
100
|
-
{
|
|
35
|
+
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
|
|
101
36
|
const auto &oldViewProps = *std::static_pointer_cast<A11yIndexViewProps const>(_props);
|
|
102
37
|
const auto &newViewProps = *std::static_pointer_cast<A11yIndexViewProps const>(props);
|
|
103
|
-
[super updateProps
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
BOOL isIndexChanged = oldViewProps.orderIndex != newViewProps.orderIndex || _a11yItemDelegate.position == nil;
|
|
107
|
-
if(isIndexChanged) {
|
|
38
|
+
[super updateProps:props oldProps:oldProps];
|
|
39
|
+
|
|
40
|
+
if (oldViewProps.orderIndex != newViewProps.orderIndex || [self delegatePosition] == nil) {
|
|
108
41
|
[self setPosition: @(newViewProps.orderIndex)];
|
|
109
42
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if(isOrderChanged) {
|
|
43
|
+
|
|
44
|
+
if (oldViewProps.orderKey != newViewProps.orderKey || [self delegateOrderKey] == nil) {
|
|
113
45
|
[self setOrderKey: [NSString stringWithUTF8String:newViewProps.orderKey.c_str()]];
|
|
114
46
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if(isOrderFocusTypeChanged) {
|
|
47
|
+
|
|
48
|
+
if (oldViewProps.orderFocusType != newViewProps.orderFocusType || [self delegateOrderFocusType] == nil) {
|
|
118
49
|
[self setOrderFocusType: @(newViewProps.orderFocusType)];
|
|
119
50
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
- (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
|
|
123
|
-
[super finalizeUpdates:updateMask];
|
|
124
|
-
[_a11yItemDelegate finalizeUpdates];
|
|
125
|
-
}
|
|
126
51
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
52
|
+
if (self.groupChildrenMode != newViewProps.shouldGroupAccessibilityChildren) {
|
|
53
|
+
self.groupChildrenMode = newViewProps.shouldGroupAccessibilityChildren;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (self.descendantFocusChangedEnabled != newViewProps.descendantFocusChangedEnabled) {
|
|
57
|
+
[self setDescendantFocusChangedEnabled: newViewProps.descendantFocusChangedEnabled];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (oldViewProps.containerType != newViewProps.containerType) {
|
|
61
|
+
NSInteger containerType = newViewProps.containerType;
|
|
62
|
+
self.accessibilityContainerType = (UIAccessibilityContainerType)containerType;
|
|
135
63
|
}
|
|
136
64
|
}
|
|
137
65
|
|
|
138
|
-
|
|
139
|
-
{
|
|
140
|
-
[_a11yItemDelegate clear];
|
|
141
|
-
[super prepareForRecycle];
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
Class<RCTComponentViewProtocol> A11yIndexViewCls(void)
|
|
145
|
-
{
|
|
66
|
+
Class<RCTComponentViewProtocol> A11yIndexViewCls(void) {
|
|
146
67
|
return RNAOA11yIndexView.class;
|
|
147
68
|
}
|
|
148
69
|
|
|
149
70
|
#endif
|
|
150
71
|
|
|
151
|
-
|
|
152
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
153
|
-
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
154
|
-
[RNAOFabricEventHelper onIndexViewFocusChange:isFocused withEmitter:_eventEmitter];
|
|
155
|
-
}
|
|
156
|
-
#else
|
|
157
|
-
- (void)onScreenReaderFocusChangeHandler:(BOOL)isFocused {
|
|
158
|
-
if (self.onScreenReaderFocusChange) {
|
|
159
|
-
self.onScreenReaderFocusChange(@{@"isFocused" : @(isFocused)});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
#endif
|
|
163
|
-
|
|
164
|
-
- (void)onFocusItemLinked: (UIView*)view {
|
|
165
|
-
[view setScreenReaderFocusDelegate: self];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
- (void)onFocusItemRemoved: (UIView*)view {
|
|
169
|
-
[view clearScreenReaderFocusDelegate];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
- (void)onScreenReaderFocusChanged:(BOOL)focused {
|
|
173
|
-
[self onScreenReaderFocusChangeHandler: focused];
|
|
174
|
-
}
|
|
175
|
-
|
|
176
72
|
@end
|
|
@@ -49,6 +49,21 @@ RCT_EXPORT_METHOD(focus:(nonnull NSNumber *)reactTag)
|
|
|
49
49
|
}];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
RCT_CUSTOM_VIEW_PROPERTY(descendantFocusChangedEnabled, BOOL, RNAOA11yIndexView)
|
|
53
|
+
{
|
|
54
|
+
BOOL value = json ? [RCTConvert BOOL:json] : NO;
|
|
55
|
+
[view setDescendantFocusChangedEnabled: value];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
RCT_CUSTOM_VIEW_PROPERTY(containerType, NSInteger, UIView)
|
|
59
|
+
{
|
|
60
|
+
NSInteger viewContainerType = json ? [RCTConvert NSInteger:json] : 0;
|
|
61
|
+
view.accessibilityContainerType = (UIAccessibilityContainerType)viewContainerType;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
RCT_EXPORT_VIEW_PROPERTY(onScreenReaderFocused, RCTDirectEventBlock)
|
|
52
65
|
RCT_EXPORT_VIEW_PROPERTY(onScreenReaderFocusChange, RCTDirectEventBlock)
|
|
66
|
+
RCT_EXPORT_VIEW_PROPERTY(onScreenReaderDescendantFocusChanged, RCTDirectEventBlock)
|
|
67
|
+
|
|
53
68
|
|
|
54
69
|
@end
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
#import "RNAOA11yPaneTitleView.h"
|
|
13
13
|
#import "UIViewController+RNAOA11yOrder.h"
|
|
14
14
|
#import "RNAOA11yAnnounceService.h"
|
|
15
|
+
#import "RNAOSpeechAttributes.h"
|
|
15
16
|
|
|
16
17
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
17
18
|
|
|
@@ -99,10 +100,10 @@ Class<RCTComponentViewProtocol> A11yPaneTitleCls(void)
|
|
|
99
100
|
|
|
100
101
|
if(self.window && !_announced) {
|
|
101
102
|
_announced = YES;
|
|
102
|
-
[
|
|
103
|
+
[self _announce:_title];
|
|
103
104
|
}
|
|
104
105
|
if(!self.window && _announced && _detachMessage) {
|
|
105
|
-
[
|
|
106
|
+
[self _announce:_detachMessage];
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
if (self.window) {
|
|
@@ -113,5 +114,14 @@ Class<RCTComponentViewProtocol> A11yPaneTitleCls(void)
|
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
- (void)_announce:(NSString *)message {
|
|
118
|
+
if (@available(iOS 17.0, *)) {
|
|
119
|
+
NSAttributedString *attrStr = [RNAOSpeechAttributes attributedStringFor:message
|
|
120
|
+
options:@{ @"priority": @"high", @"queue": @NO }];
|
|
121
|
+
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, attrStr);
|
|
122
|
+
} else {
|
|
123
|
+
[[RNAOA11yAnnounceService shared] announce:message];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
116
126
|
|
|
117
127
|
@end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#ifndef RNAOA11yGroupChildrenView_h
|
|
2
|
+
#define RNAOA11yGroupChildrenView_h
|
|
3
|
+
|
|
4
|
+
#import "RNAOA11yScreenReaderView.h"
|
|
5
|
+
|
|
6
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
7
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
// groupChildrenMode: -1 = defer to super (default), 0 = NO, 1 = YES
|
|
11
|
+
@interface RNAOA11yGroupChildrenView : RNAOA11yScreenReaderView
|
|
12
|
+
|
|
13
|
+
@property (nonatomic) int groupChildrenMode;
|
|
14
|
+
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
18
|
+
NS_ASSUME_NONNULL_END
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#endif /* RNAOA11yGroupChildrenView_h */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#import "RNAOA11yGroupChildrenView.h"
|
|
2
|
+
|
|
3
|
+
@implementation RNAOA11yGroupChildrenView
|
|
4
|
+
|
|
5
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
6
|
+
if (self = [super initWithFrame:frame]) {
|
|
7
|
+
_groupChildrenMode = -1;
|
|
8
|
+
}
|
|
9
|
+
return self;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
- (BOOL)shouldGroupAccessibilityChildren {
|
|
13
|
+
if (_groupChildrenMode == -1) {
|
|
14
|
+
return [super shouldGroupAccessibilityChildren];
|
|
15
|
+
}
|
|
16
|
+
return (BOOL)_groupChildrenMode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#ifndef RNAOA11yManagedFocusView_h
|
|
2
|
+
#define RNAOA11yManagedFocusView_h
|
|
3
|
+
|
|
4
|
+
#import "RNAOA11yGroupChildrenView.h"
|
|
5
|
+
#import "RNAOA11yFocusService.h"
|
|
6
|
+
|
|
7
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
8
|
+
|
|
9
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
10
|
+
|
|
11
|
+
@interface RNAOA11yManagedFocusView : RNAOA11yGroupChildrenView<RNAOA11yFocusServiceSubscriber>
|
|
12
|
+
@property BOOL descendantFocusChangedEnabled;
|
|
13
|
+
@end
|
|
14
|
+
|
|
15
|
+
NS_ASSUME_NONNULL_END
|
|
16
|
+
|
|
17
|
+
#else
|
|
18
|
+
|
|
19
|
+
@interface RNAOA11yManagedFocusView : RNAOA11yGroupChildrenView<RNAOA11yFocusServiceSubscriber>
|
|
20
|
+
@property BOOL descendantFocusChangedEnabled;
|
|
21
|
+
@property (nonatomic, copy) RCTDirectEventBlock onScreenReaderDescendantFocusChanged;
|
|
22
|
+
@property (nonatomic, copy) RCTDirectEventBlock onScreenReaderFocusChange;
|
|
23
|
+
@property (nonatomic, copy) RCTDirectEventBlock onScreenReaderFocused;
|
|
24
|
+
@end
|
|
25
|
+
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
#endif /* RNAOA11yManagedFocusView_h */
|