From 1eea7c7c9a92c68860de860f10e3a74f5d90bb11 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Tue, 23 Dec 2025 11:09:40 -0500 Subject: [PATCH 1/5] Add documentation for sendAccessibilityEvent --- docs/accessibilityinfo.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/accessibilityinfo.md b/docs/accessibilityinfo.md index 81e2c119ade..3462ce48b06 100644 --- a/docs/accessibilityinfo.md +++ b/docs/accessibilityinfo.md @@ -236,6 +236,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -247,3 +251,22 @@ On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `re :::note Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. ::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Send an accessibility event to a React component. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| - | - | - | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'`, `'focus'`, or `'viewHoverEnter'` | From 83f3bd38c7eb220d1ff2b697d8380d1407f3fbc2 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Tue, 23 Dec 2025 11:19:11 -0500 Subject: [PATCH 2/5] Add windowStateChange to valid types --- docs/accessibilityinfo.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/accessibilityinfo.md b/docs/accessibilityinfo.md index 3462ce48b06..89e7a95af76 100644 --- a/docs/accessibilityinfo.md +++ b/docs/accessibilityinfo.md @@ -260,7 +260,7 @@ Make sure that any `View` you want to receive the accessibility focus has `acces static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); ``` -Send an accessibility event to a React component. +Imperatively trigger an accessibility event to a React component, like :::note Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. @@ -269,4 +269,4 @@ Make sure that any `View` you want to receive the accessibility focus has `acces | Name | Type | Description | | - | - | - | | host
Required
| HostInstance | The component ref to send the event to. | -| eventType
Required
| AccessibilityEventTypes | One of `'click'`, `'focus'`, or `'viewHoverEnter'` | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | From 24ce3320b075a960624fc5b9bc12d399ae550344 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Tue, 23 Dec 2025 11:30:06 -0500 Subject: [PATCH 3/5] Fix formatting --- docs/accessibilityinfo.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/accessibilityinfo.md b/docs/accessibilityinfo.md index 89e7a95af76..a1e9c989e1b 100644 --- a/docs/accessibilityinfo.md +++ b/docs/accessibilityinfo.md @@ -266,7 +266,7 @@ Imperatively trigger an accessibility event to a React component, like Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. ::: -| Name | Type | Description | -| - | - | - | -| host
Required
| HostInstance | The component ref to send the event to. | -| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | From 3d119ba529d22a6413bb9f2d92dd4d71f9f98298 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Tue, 23 Dec 2025 11:37:34 -0500 Subject: [PATCH 4/5] Improve examples for sendAccessibilityEvent --- docs/accessibilityinfo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/accessibilityinfo.md b/docs/accessibilityinfo.md index a1e9c989e1b..bc93e4ae870 100644 --- a/docs/accessibilityinfo.md +++ b/docs/accessibilityinfo.md @@ -260,7 +260,7 @@ Make sure that any `View` you want to receive the accessibility focus has `acces static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); ``` -Imperatively trigger an accessibility event to a React component, like +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. :::note Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. From 9df23a293be40208a60dd8d0d56fe0a95e8b74f7 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Tue, 23 Dec 2025 15:01:04 -0500 Subject: [PATCH 5/5] Update old, versioned docs --- .../version-0.77/accessibilityinfo.md | 27 ++++++++++++++++++- .../version-0.78/accessibilityinfo.md | 27 ++++++++++++++++++- .../version-0.79/accessibilityinfo.md | 27 ++++++++++++++++++- .../version-0.80/accessibilityinfo.md | 27 ++++++++++++++++++- .../version-0.81/accessibilityinfo.md | 27 ++++++++++++++++++- .../version-0.82/accessibilityinfo.md | 23 ++++++++++++++++ .../version-0.83/accessibilityinfo.md | 23 ++++++++++++++++ 7 files changed, 176 insertions(+), 5 deletions(-) diff --git a/website/versioned_docs/version-0.77/accessibilityinfo.md b/website/versioned_docs/version-0.77/accessibilityinfo.md index 3d77f80884f..93902f6fb5a 100644 --- a/website/versioned_docs/version-0.77/accessibilityinfo.md +++ b/website/versioned_docs/version-0.77/accessibilityinfo.md @@ -234,6 +234,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -242,4 +246,25 @@ Set accessibility focus to a React component. On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments. -> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.78/accessibilityinfo.md b/website/versioned_docs/version-0.78/accessibilityinfo.md index 3d77f80884f..93902f6fb5a 100644 --- a/website/versioned_docs/version-0.78/accessibilityinfo.md +++ b/website/versioned_docs/version-0.78/accessibilityinfo.md @@ -234,6 +234,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -242,4 +246,25 @@ Set accessibility focus to a React component. On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments. -> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.79/accessibilityinfo.md b/website/versioned_docs/version-0.79/accessibilityinfo.md index 3d77f80884f..93902f6fb5a 100644 --- a/website/versioned_docs/version-0.79/accessibilityinfo.md +++ b/website/versioned_docs/version-0.79/accessibilityinfo.md @@ -234,6 +234,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -242,4 +246,25 @@ Set accessibility focus to a React component. On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments. -> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.80/accessibilityinfo.md b/website/versioned_docs/version-0.80/accessibilityinfo.md index 3d77f80884f..93902f6fb5a 100644 --- a/website/versioned_docs/version-0.80/accessibilityinfo.md +++ b/website/versioned_docs/version-0.80/accessibilityinfo.md @@ -234,6 +234,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -242,4 +246,25 @@ Set accessibility focus to a React component. On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments. -> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.81/accessibilityinfo.md b/website/versioned_docs/version-0.81/accessibilityinfo.md index 3d77f80884f..93902f6fb5a 100644 --- a/website/versioned_docs/version-0.81/accessibilityinfo.md +++ b/website/versioned_docs/version-0.81/accessibilityinfo.md @@ -234,6 +234,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -242,4 +246,25 @@ Set accessibility focus to a React component. On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments. -> **Note**: Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.82/accessibilityinfo.md b/website/versioned_docs/version-0.82/accessibilityinfo.md index 81e2c119ade..bc93e4ae870 100644 --- a/website/versioned_docs/version-0.82/accessibilityinfo.md +++ b/website/versioned_docs/version-0.82/accessibilityinfo.md @@ -236,6 +236,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -247,3 +251,22 @@ On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `re :::note Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. ::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) | diff --git a/website/versioned_docs/version-0.83/accessibilityinfo.md b/website/versioned_docs/version-0.83/accessibilityinfo.md index 81e2c119ade..bc93e4ae870 100644 --- a/website/versioned_docs/version-0.83/accessibilityinfo.md +++ b/website/versioned_docs/version-0.83/accessibilityinfo.md @@ -236,6 +236,10 @@ Query whether reduce motion and prefer cross-fade transitions settings are curre ### `setAccessibilityFocus()` +:::warning Deprecated +Prefer using `sendAccessibilityEvent` with eventType `focus` instead. +::: + ```tsx static setAccessibilityFocus(reactTag: number); ``` @@ -247,3 +251,22 @@ On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `re :::note Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. ::: + +--- + +### `sendAccessibilityEvent()` + +```tsx +static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes); +``` + +Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader. + +:::note +Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`. +::: + +| Name | Type | Description | +| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| host
Required
| HostInstance | The component ref to send the event to. | +| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) |