react-native-a11y-order 0.2.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,10 +4,6 @@ React Native A11y Order Library: Advanced control of screen reader order.
4
4
 
5
5
  Setting the right reading order can be a challenge, but there is a way to do it. The react-native-a11y-order is a native-first library designed to solve problems with the ordering of screen readers on both Android and iOS platforms.
6
6
 
7
- ## Breaking Changes !!!
8
- > The `A11yModule`, `A11yOrder` and hooks `useFocusOrder`, `useDynamicFocusOrder`, and `useA11yOrderManager` have been removed. This API was deprecated and did not work properly with the new architecture. You can refer to the migration guide to update it.
9
-
10
-
11
7
  | iOS reader | Android reader |
12
8
  | --------------------------------------------------------- | ------------------------------------------------------------- |
13
9
  | <img src="/.github/images/ios-reader.gif" height="500" /> | <img src="/.github/images/android-reader.gif" height="500" /> |
@@ -26,6 +22,25 @@ npm install react-native-a11y-order
26
22
  yarn add react-native-a11y-order
27
23
  ```
28
24
 
25
+ ### For React Native Below Version 0.74.x
26
+ If you are using a React Native version below `0.74.x` with NewArch enabled, you may encounter an error with component registration. To resolve this issue, add the following code to your `ios/Podfile` file.
27
+
28
+
29
+
30
+ ```
31
+ post_install do |installer|
32
+ installer.pods_project.targets.each do |target|
33
+ target.build_configurations.each do |config|
34
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
35
+ config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << "RCT_VIEW_MANAGER_ENABLED=1"
36
+ end
37
+ end
38
+ end
39
+ ```
40
+
41
+ You can also use version `react-native-a11y-order@0.2.5`. Version `0.3.0` is released solely to support React Native versions `0.79.x to 0.80.x`.
42
+
43
+
29
44
  ## Usage
30
45
 
31
46
  #### A11y.Order, A11y.Index
@@ -250,6 +265,12 @@ The new approach is better: we no longer need to manage refs, worry about attach
250
265
 
251
266
  That's all. The index changes, removals, etc., should work out of the box.
252
267
 
268
+ ## Roadmap
269
+ * Add order links for better focus control
270
+ * Add preferred focus logic for focus "return" functionality
271
+ * Refactor and optimize performance
272
+ * Add documentation and descriptive examples
273
+
253
274
  ## Contributing
254
275
 
255
276
  See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
@@ -5,13 +5,17 @@
5
5
  // Created by Artur Kalach on 13/07/2024.
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
8
9
 
9
10
  #ifndef RNAOA11yGroupViewManager_h
10
11
  #define RNAOA11yGroupViewManager_h
11
12
 
13
+
12
14
  #import <React/RCTViewManager.h>
13
15
  @interface RNAOA11yGroupViewManager : RCTViewManager
14
16
  @end
15
17
 
16
18
 
17
19
  #endif /* RNAOA11yGroupViewManager_h */
20
+
21
+ #endif
@@ -6,6 +6,8 @@
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
8
 
9
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
10
+
9
11
  #import <Foundation/Foundation.h>
10
12
 
11
13
  #import <React/RCTViewManager.h>
@@ -23,3 +25,5 @@ RCT_EXPORT_MODULE(A11yGroupView)
23
25
  }
24
26
 
25
27
  @end
28
+
29
+ #endif
@@ -6,6 +6,8 @@
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
8
 
9
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
10
+
9
11
  #ifndef RNAOA11yIndexViewManager_h
10
12
  #define RNAOA11yIndexViewManager_h
11
13
 
@@ -17,3 +19,5 @@
17
19
 
18
20
 
19
21
  #endif /* RNAOA11yIndexViewManager_h */
22
+
23
+ #endif
@@ -6,6 +6,8 @@
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
8
 
9
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
10
+
9
11
  #import <React/RCTViewManager.h>
10
12
  #import <React/RCTUIManager.h>
11
13
  #import "RNAOA11yIndexView.h"
@@ -44,3 +46,5 @@ RCT_EXPORT_METHOD(focus:(nonnull NSNumber *)reactTag)
44
46
  }
45
47
 
46
48
  @end
49
+
50
+ #endif
@@ -6,6 +6,8 @@
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
8
 
9
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
10
+
9
11
  #ifndef RNAOA11yOrderViewManager_h
10
12
  #define RNAOA11yOrderViewManager_h
11
13
 
@@ -16,3 +18,5 @@
16
18
 
17
19
 
18
20
  #endif /* RNAOA11yOrderViewManager_h */
21
+
22
+ #endif
@@ -6,8 +6,9 @@
6
6
  // Copyright © 2024 Facebook. All rights reserved.
7
7
  //
8
8
 
9
- #import <Foundation/Foundation.h>
9
+ #if (!defined(RCT_NEW_ARCH_ENABLED) || RCT_NEW_ARCH_ENABLED == 0) || (defined(RCT_VIEW_MANAGER_ENABLED) && RCT_VIEW_MANAGER_ENABLED == 1)
10
10
 
11
+ #import <Foundation/Foundation.h>
11
12
 
12
13
  #import <React/RCTViewManager.h>
13
14
  #import <React/RCTUIManager.h>
@@ -30,3 +31,5 @@ RCT_CUSTOM_VIEW_PROPERTY(orderKey, NSString, RNAOA11yOrderView)
30
31
  }
31
32
 
32
33
  @end
34
+
35
+ #endif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-a11y-order",
3
- "version": "0.2.5",
3
+ "version": "0.3.1",
4
4
  "description": "ReactNative library for managing screen reader focus ordering",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",