Skip to content

Remove unsupported event from accessibilityinfo.md#4728

Closed
rumeysabulut wants to merge 1 commit into
react:mainfrom
rumeysabulut:patch-3
Closed

Remove unsupported event from accessibilityinfo.md#4728
rumeysabulut wants to merge 1 commit into
react:mainfrom
rumeysabulut:patch-3

Conversation

@rumeysabulut

Copy link
Copy Markdown
Contributor

The event name 'accessibilityServiceChanged' is not present in react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts It's not supported, therefore the info is misleading

The event name 'accessibilityServiceChanged' is not present in react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts It's not supported, therefore the info is misleading
@meta-cla meta-cla Bot added the CLA Signed label Aug 13, 2025
@netlify

netlify Bot commented Aug 13, 2025

Copy link
Copy Markdown

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit a2df2e5
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/689c6adcf4c6ec00081d6d55
😎 Deploy Preview https://deploy-preview-4728--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cortinico

Copy link
Copy Markdown
Contributor

It's not supported, therefore the info is misleading

@rumeysabulut can you clarify why you say it's not supported?

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(see my other comment)

@rumeysabulut

Copy link
Copy Markdown
Contributor Author

We're using TypeScript in our project, and I'm trying to work with the 'accessibilityServiceChanged' event.

const accessibilityServiceChangedSubscription =
      AccessibilityInfo.addEventListener(
        'accessibilityServiceChanged',
        (isAccessibilityServiceChanged) => {
          console.log(
            'isAccessibilityServiceChanged:',
            isAccessibilityServiceChanged,
          );
        },
      );

Although I can retrieve the value, I’m getting a type error because the event name isn’t defined in AccessibilityInfo.d.ts That made me wonder if it’s no longer supported. However, a better approach might be to add accessibilityServiceChanged to the AccessibilityChangeEventName type—unless it's expected to be deprecated, in which case it might be best to avoid relying on it.

@cortinico

Copy link
Copy Markdown
Contributor

I definitely see accessibilityServiceChanged exposed from our public API here: https://github.com/facebook/react-native/blob/c5956da8c0b735d47761af51019ed25b49001c00/packages/react-native/ReactNativeApi.d.ts#L1058-L1061

The types you referred to are the old one which were community contributed and not 100% exact.

@cortinico cortinico closed this Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants