You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This API is experimental.** Experimental APIs may contain bugs and are likely to change in a future version of React Native. Don't use them in production.
Copy file name to clipboardExpand all lines: docs/_getting-started-linux-android.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ While you can use any editor of your choice to develop your app, you will need t
6
6
7
7
<h3>Node</h3>
8
8
9
-
Follow the [installation instructions for your Linux distribution](https://nodejs.org/en/download/package-manager/) to install Node 18.18 or newer.
9
+
Follow the [installation instructions for your Linux distribution](https://nodejs.org/en/download/package-manager/) to install Node 20.19.4 or newer.
10
10
11
11
<h3>Java Development Kit</h3>
12
12
@@ -26,7 +26,9 @@ Setting up your development environment can be somewhat tedious if you're new to
26
26
27
27
Then, click "Next" to install all of these components.
28
28
29
-
> If the checkboxes are grayed out, you will have a chance to install these components later on.
29
+
:::note
30
+
If the checkboxes are grayed out, you will have a chance to install these components later on.
31
+
:::
30
32
31
33
Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
32
34
@@ -36,7 +38,9 @@ Android Studio installs the latest Android SDK by default. Building a React Nati
36
38
37
39
To do that, open Android Studio, click on "Configure" button and select "SDK Manager".
38
40
39
-
> The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
41
+
:::tip
42
+
The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
43
+
:::
40
44
41
45
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
> `.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file.
66
+
:::note
67
+
`.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file.
68
+
:::
63
69
64
70
Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`.
65
71
66
-
> Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
72
+
:::note
73
+
Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
74
+
:::
67
75
68
76
<h3>Watchman</h3>
69
77
70
78
Follow the [Watchman installation guide](https://facebook.github.io/watchman/docs/install#buildinstall) to compile and install Watchman from source.
71
79
72
-
> [Watchman](https://facebook.github.io/watchman/docs/install) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance and increased compatibility in certain edge cases (translation: you may be able to get by without installing this, but your mileage may vary; installing this now may save you from a headache later).
80
+
:::info
81
+
[Watchman](https://facebook.github.io/watchman/docs/install) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance and increased compatibility in certain edge cases (translation: you may be able to get by without installing this, but your mileage may vary; installing this now may save you from a headache later).
82
+
:::
73
83
74
84
<h2>Preparing the Android device</h2>
75
85
@@ -89,7 +99,9 @@ If you use Android Studio to open `./AwesomeProject/android`, you can see the li
89
99
90
100
If you have recently installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **VanillaIceCream** API Level 35 image.
91
101
92
-
> We recommend configuring [VM acceleration](https://developer.android.com/studio/run/emulator-acceleration.html#vm-linux) on your system to improve performance. Once you've followed those instructions, go back to the AVD Manager.
102
+
:::tip
103
+
We recommend configuring [VM acceleration](https://developer.android.com/studio/run/emulator-acceleration.html#vm-linux) on your system to improve performance. Once you've followed those instructions, go back to the AVD Manager.
104
+
:::
93
105
94
106
Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it.
Copy file name to clipboardExpand all lines: docs/_getting-started-macos-android.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ brew install node
13
13
brew install watchman
14
14
```
15
15
16
-
If you have already installed Node on your system, make sure it is Node 18.18 or newer.
16
+
If you have already installed Node on your system, make sure it is Node 20.19.4 or newer.
17
17
18
18
[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
19
19
@@ -65,7 +65,9 @@ Setting up your development environment can be somewhat tedious if you're new to
65
65
66
66
Then, click "Next" to install all of these components.
67
67
68
-
> If the checkboxes are grayed out, you will have a chance to install these components later on.
68
+
::note
69
+
If the checkboxes are grayed out, you will have a chance to install these components later on.
70
+
:::
69
71
70
72
Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
71
73
@@ -77,7 +79,9 @@ To do that, open Android Studio, click on "More Actions" button and select "SDK
77
79
78
80

79
81
80
-
> The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
82
+
:::tip
83
+
The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
84
+
:::
81
85
82
86
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
Run `source ~/.zprofile` (or `source ~/.bash_profile` for `bash`) to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`.
104
108
105
-
> Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
109
+
:::note
110
+
Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
Copy file name to clipboardExpand all lines: docs/_getting-started-macos-ios.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ brew install node
13
13
brew install watchman
14
14
```
15
15
16
-
If you have already installed Node on your system, make sure it is Node 18.18 or newer.
16
+
If you have already installed Node on your system, make sure it is Node 20.19.4 or newer.
17
17
18
18
[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
If you have already installed Node on your system, make sure it is Node 18 or newer. If you already have a JDK on your system, we recommend JDK17. You may encounter problems using higher JDK versions.
22
22
23
-
> You can find additional installation options on [Node's Downloads page](https://nodejs.org/en/download/).
23
+
:::note
24
+
You can find additional installation options on [Node's Downloads page](https://nodejs.org/en/download/).
25
+
:::
24
26
25
-
> If you're using the latest version of Java Development Kit, you'll need to change the Gradle version of your project so it can recognize the JDK. You can do that by going to `{project root folder}\android\gradle\wrapper\gradle-wrapper.properties` and changing the `distributionUrl` value to upgrade the Gradle version. You can check out [here the latest releases of Gradle](https://gradle.org/releases/).
27
+
:::info
28
+
If you're using the latest version of Java Development Kit, you'll need to change the Gradle version of your project so it can recognize the JDK. You can do that by going to `{project root folder}\android\gradle\wrapper\gradle-wrapper.properties` and changing the `distributionUrl` value to upgrade the Gradle version. You can check out [here the latest releases of Gradle](https://gradle.org/releases/).
29
+
:::
26
30
27
31
<h3>Android development environment</h3>
28
32
@@ -39,7 +43,9 @@ Setting up your development environment can be somewhat tedious if you're new to
39
43
40
44
Then, click "Next" to install all of these components.
41
45
42
-
> If the checkboxes are grayed out, you will have a chance to install these components later on.
46
+
:::note
47
+
If the checkboxes are grayed out, you will have a chance to install these components later on.
48
+
:::
43
49
44
50
Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
45
51
@@ -51,7 +57,9 @@ To do that, open Android Studio, click on "More Actions" button and select "SDK
51
57
52
58

53
59
54
-
> The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
60
+
:::tip
61
+
The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
62
+
:::
55
63
56
64
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
57
65
@@ -120,7 +128,9 @@ If you use Android Studio to open `./AwesomeProject/android`, you can see the li
120
128
121
129
If you have recently installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **VanillaIceCream** API Level 35 image.
122
130
123
-
> If you don't have HAXM installed, click on "Install HAXM" or follow [these instructions](https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows) to set it up, then go back to the AVD Manager.
131
+
:::note
132
+
If you don't have HAXM installed, click on "Install HAXM" or follow [these instructions](https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows) to set it up, then go back to the AVD Manager.
133
+
:::
124
134
125
135
Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it.
Copy file name to clipboardExpand all lines: docs/accessibility.md
+100-5Lines changed: 100 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ title: Accessibility
4
4
description: Create mobile apps accessible to assistive technology with React Native's suite of APIs designed to work with Android and iOS.
5
5
---
6
6
7
+
import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';
8
+
7
9
Both Android and iOS provide APIs for integrating apps with assistive technologies like the bundled screen readers VoiceOver (iOS) and TalkBack (Android). React Native has complementary APIs that let your app accommodate all users.
8
10
9
11
:::info
@@ -222,9 +224,9 @@ For example, in a window that contains sibling views `A` and `B`, setting `acces
A boolean value indicating whether the accessibility elements contained within this accessibility element are hidden.
227
+
A boolean value indicating whether the given accessibility element, and any accessibility elements it contains, are hidden.
226
228
227
-
For example, in a window that contains sibling views `A` and `B`, setting `accessibilityElementsHidden` to `true` on view `B` causes VoiceOver to ignore the elements in view `B`. This is similar to the Android property `importantForAccessibility="no-hide-descendants"`.
229
+
For example, in a window that contains sibling views `A` and `B`, setting `accessibilityElementsHidden` to `true` on view `B` causes VoiceOver to ignore the `B` view and any elements it contains. This is similar to the Android property `importantForAccessibility="no-hide-descendants"`.
228
230
229
231
### `aria-valuemax`
230
232
@@ -276,17 +278,17 @@ Indicates whether an expandable element is currently expanded or collapsed.
276
278
277
279
### `aria-hidden`
278
280
279
-
Indicates whether the accessibility elements contained within this accessibility element are hidden.
281
+
Indicates whether the element is hidden from assistive technologies.
280
282
281
-
For example, in a window that contains sibling views `A` and `B`, setting `aria-hidden` to `true` on view `B` causes VoiceOver to ignore the elements in view `B`.
283
+
For example, in a window that contains sibling views `A` and `B`, setting `aria-hidden` to `true` on view `B` causes VoiceOver to ignore the `B` element and its children.
282
284
283
285
| Type | Default |
284
286
| ------- | ------- |
285
287
| boolean | false |
286
288
287
289
### `aria-label`
288
290
289
-
Defines a string value that labels an interactive element.
291
+
Defines a string value that can be used to name an element.
290
292
291
293
| Type |
292
294
| ------ |
@@ -337,6 +339,99 @@ Indicates whether a selectable element is currently selected or not.
337
339
| ------- |
338
340
| boolean |
339
341
342
+
### `experimental_accessibilityOrder`
343
+
344
+
<ExperimentalAPIWarning />
345
+
346
+
:::note
347
+
For the sake of brevity, layout is excluded in the following examples even though it dictates the default focus order. Assume the document order matches the layout order.
348
+
:::
349
+
350
+
`experimental_accessibilityOrder` lets you define the order in which assistive technologies focus descendant components. It is an array of [`nativeIDs`](view.md#nativeid) that are set on the components whose order you are controlling. For example:
Assistive technologies will focus the `View` with `nativeID` of `B`, then `C`, then `A`.
361
+
362
+
`experimental_accessibilityOrder` will not “turn on” accessibility for the components it references, that still needs to be done. So if we remove `accessible={true}` on `C` above like so
The focus order will be `B`, `D`, `E`, `F`, `A`. Even though `D`, `E`, and `F` are not directly referenced in `experimental_accessibilityOrder`, `C` is directly referenced. In this instance `C` in an _accessibility container_ - it contains accessible elements, but is not accessible itself. If an accessibility container is referenced in `experimental_accessibilityOrder` then the default order of the elements it contains is applied. In this sense `experimental_accessibilityOrder` is _nestable_.
402
+
403
+
`experimental_accessibilityOrder` can also reference another component with `experimental_accessibilityOrder`
The focus order would be `B`, `C`, `A`. `D`, `E`, and `F` are no longer in a container, so the exhaustive nature of `experimental_accessibilityOrder` means they will be excluded.
In the case of two overlapping UI components with the same parent, default accessibility focus can have unpredictable behavior. The `importantForAccessibility` property will resolve this by controlling if a view fires accessibility events and if it is reported to accessibility services. It can be set to `auto`, `yes`, `no` and `no-hide-descendants` (the last value will force accessibility services to ignore the component and all of its children).
Check whether any accessibility service is enabled. This includes TalkBack but also any third-party accessibility app that may be installed. To only check whether TalkBack is enabled, use [isScreenReaderEnabled](#isscreenreaderenabled). Returns a promise which resolves to a boolean. The result is `true` when some accessibility services is enabled and `false` otherwise.
160
160
161
-
> **Note**: Please use [isScreenReaderEnabled](#isscreenreaderenabled) if you only want to check the status of TalkBack.
161
+
:::note
162
+
Please use [`isScreenReaderEnabled`](#isscreenreaderenabled) if you only want to check the status of TalkBack.
163
+
:::
162
164
163
165
---
164
166
@@ -242,4 +244,6 @@ Set accessibility focus to a React component.
242
244
243
245
On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments.
244
246
245
-
> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
247
+
:::note
248
+
Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
0 commit comments