Skip to content

Accessibility code needs forward-port to RN60 APIs #1125

Open
DefinitelyTyped/DefinitelyTyped
#37745
@mikehardy

Description

@mikehardy

There is a related issue in #893 about some deprecated APIs, but more importantly, an API in use now is completely gone from RN59 to RN60 - RN.AccessibilityInfo.fetch()

React-Native added support for more accessibility features, and they broke the API out into multiple feature-specific APIs.

Here's the documentation update facebook/react-native-website#835

The API in use is here: https://github.com/microsoft/reactxp/blob/master/src/native-common/Accessibility.ts#L39

The corresponding API (for screen-reader only, to make ReactXP work with RN60) would be to use RN.AccessibilityInfo.isScreenReaderEnabled() and to register the listener for 'screenReaderChanged' event vs 'changed'

I will propose a PR for that specific change as ReactXP will be a breaking-change anyway so it's okay for it not to work on RN59, but future enhancements should expand the Accessibility to take advantage of the rest of the new features. If that is desired I could propose a second PR that offers complete coverage of the enhanced API though I may need some hand-holding in how to deal with iOS/Android-specific differences as parts of the API are available only on one platform or another

Cross-linking with #1123 for visibility there since I mentioned it prior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions