Skip to content

Fix missing and incorrect AccessibilityInfo types (#56708)#56708

Closed
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D104057500
Closed

Fix missing and incorrect AccessibilityInfo types (#56708)#56708
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D104057500

Conversation

@huntie
Copy link
Copy Markdown
Member

@huntie huntie commented May 6, 2026

Summary:

Context

Claude-driven audit of Flow source code vs existing public TypeScript API (manual).

Changes

Alignments to the AccessibilityInfo module for both the source Flow types and manual TS types:

  • Flow: Move grayscaleChanged and invertColorsChanged into shared AccessibilityEventDefinitions — both events are registered on both platforms in the EventNames map.
  • TS: Add missing event types (accessibilityServiceChanged, announcementFinished, darkerSystemColorsChanged, highTextContrastChanged, windowStateChange) and platform-specific JSDoc to AccessibilityChangeEventName members.

Changelog:
[General][Fixed] - Fix missing and incorrect types in AccessibilityInfo TypeScript definitions

Reviewed By: christophpurrer

Differential Revision: D104057500

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 6, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 6, 2026

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104057500.

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels May 6, 2026
@huntie huntie changed the title Add missing event names in AccessibilityInfo types Fix missing and incorrect AccessibilityInfo types May 7, 2026
@meta-codesync meta-codesync Bot changed the title Fix missing and incorrect AccessibilityInfo types Fix missing and incorrect AccessibilityInfo types (#56708) May 7, 2026
@huntie huntie force-pushed the export-D104057500 branch from c83340d to abe873d Compare May 7, 2026 09:15
huntie added a commit to huntie/react-native that referenced this pull request May 7, 2026
Summary:
Pull Request resolved: facebook#56708

**Context**

Claude-driven audit of Flow source code vs existing public TypeScript API (manual).

**Changes**

Alignments to the `AccessibilityInfo` module for both the source Flow types and manual TS types:

- **Flow**: Move `grayscaleChanged` and `invertColorsChanged` into shared `AccessibilityEventDefinitions` — both events are registered on both platforms in the `EventNames` map.
- **TS**: Add missing event types (`accessibilityServiceChanged`, `announcementFinished`, `darkerSystemColorsChanged`, `highTextContrastChanged`, `windowStateChange`) and platform-specific JSDoc to `AccessibilityChangeEventName` members.

Changelog:
[General][Fixed] - Fix missing and incorrect types in `AccessibilityInfo` TypeScript definitions

Reviewed By: christophpurrer

Differential Revision: D104057500
huntie added a commit to huntie/react-native that referenced this pull request May 7, 2026
Summary:
Pull Request resolved: facebook#56708

**Context**

Claude-driven audit of Flow source code vs existing public TypeScript API (manual).

**Changes**

Alignments to the `AccessibilityInfo` module for both the source Flow types and manual TS types:

- **Flow**: Move `grayscaleChanged` and `invertColorsChanged` into shared `AccessibilityEventDefinitions` — both events are registered on both platforms in the `EventNames` map.
- **TS**: Add missing event types (`accessibilityServiceChanged`, `announcementFinished`, `darkerSystemColorsChanged`, `highTextContrastChanged`, `windowStateChange`) and platform-specific JSDoc to `AccessibilityChangeEventName` members.

Changelog:
[General][Fixed] - Fix missing and incorrect types in `AccessibilityInfo` TypeScript definitions

Reviewed By: christophpurrer

Differential Revision: D104057500
@huntie huntie force-pushed the export-D104057500 branch from abe873d to d5edcd5 Compare May 7, 2026 12:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

Summary:
Pull Request resolved: facebook#56708

**Context**

Claude-driven audit of Flow source code vs existing public TypeScript API (manual).

**Changes**

Alignments to the `AccessibilityInfo` module for both the source Flow types and manual TS types:

- **Flow**: Move `grayscaleChanged` and `invertColorsChanged` into shared `AccessibilityEventDefinitions` — both events are registered on both platforms in the `EventNames` map.
- **TS**: Add missing event types (`accessibilityServiceChanged`, `announcementFinished`, `darkerSystemColorsChanged`, `highTextContrastChanged`, `windowStateChange`) and platform-specific JSDoc to `AccessibilityChangeEventName` members.

Changelog:
[General][Fixed] - Fix missing and incorrect types in `AccessibilityInfo` TypeScript definitions

Reviewed By: christophpurrer

Differential Revision: D104057500
@huntie huntie force-pushed the export-D104057500 branch from d5edcd5 to fce46ae Compare May 7, 2026 12:44
@meta-codesync meta-codesync Bot closed this in 4255f9b May 7, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label May 7, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 7, 2026

This pull request has been merged in 4255f9b.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @huntie in 4255f9b

When will my fix make it into a release? | How to file a pick request?

@huntie huntie deleted the export-D104057500 branch May 7, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants