Skip to content

Remove shouldUseLinkRoleForPressableText feature flag - #55121

Closed
fabriziocucci wants to merge 1 commit into
react:mainfrom
fabriziocucci:export-D90385104
Closed

Remove shouldUseLinkRoleForPressableText feature flag#55121
fabriziocucci wants to merge 1 commit into
react:mainfrom
fabriziocucci:export-D90385104

Conversation

@fabriziocucci

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Android][Fixed] - Set accessibilityRole to "link" for pressable Text components by default


This diff removes the shouldUseLinkRoleForPressableText feature flag since it has been tested in FB4A for a month with defaultValue: true.

The flag was introduced to automatically set accessibilityRole="link" for pressable Text components by default. This behavior is now the default.

Changes:

  • Removed the flag definition from ReactNativeFeatureFlags.config.js
  • Removed the conditional checks in Text.js (2 locations), now shouldUseLinkRole is computed directly without the feature flag
  • Removed the override from ReactNativeFeatureFlagsOverrides_Facebook.js
  • Updated tests in Text-test.js to remove flag mocking and only test the enabled behavior
  • Regenerated all feature flag files via js1 featureflags --update

Reviewed By: javache

Differential Revision: D90385104

@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 Jan 12, 2026
@meta-codesync

meta-codesync Bot commented Jan 12, 2026

Copy link
Copy Markdown

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

Summary:
Pull Request resolved: #55121

Changelog: [Android][Fixed] - Set accessibilityRole to "link" for pressable Text components by default

 ---

This diff removes the `shouldUseLinkRoleForPressableText` feature flag since it has been tested in FB4A for a month with `defaultValue: true`.

The flag was introduced to automatically set `accessibilityRole="link"` for pressable Text components by default. This behavior is now the default.

Changes:
- Removed the flag definition from `ReactNativeFeatureFlags.config.js`
- Removed the conditional checks in `Text.js` (2 locations), now `shouldUseLinkRole` is computed directly without the feature flag
- Removed the override from `ReactNativeFeatureFlagsOverrides_Facebook.js`
- Updated tests in `Text-test.js` to remove flag mocking and only test the enabled behavior
- Regenerated all feature flag files via `js1 featureflags --update`

Reviewed By: javache

Differential Revision: D90385104
@meta-codesync meta-codesync Bot closed this in 68e5b4e Jan 14, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 14, 2026
@meta-codesync

meta-codesync Bot commented Jan 14, 2026

Copy link
Copy Markdown

This pull request has been merged in 68e5b4e.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @fabriziocucci in 68e5b4e

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

christopherwxyz added a commit to officialunofficial/react-native-macos that referenced this pull request Jul 16, 2026
…upstream

Text.js called ReactNativeFeatureFlags.reduceDefaultPropsInText() and
.shouldUseLinkRoleForPressableText() unconditionally at module-eval time,
but neither getter exists in this fork's generated flag registry, crashing
any app that renders <Text> (papered over downstream by a patch-package
patch in uno-infra's desktop app).

Root cause: these are not flags this fork's manual port dropped from the
config - ReactNativeFeatureFlags.config.js already correctly reflects
upstream's current, post-retirement state (verified against upstream-rn
commits 68e5b4e and 680bd5a, and upstream-rn/main, none of which
reference these flags any more; both graduated to permanent `true`
behavior). The bug is that this fork's Text.js is a stale pre-retirement
copy that still branches on them - most likely a merge conflict that was
resolved by keeping the fork's older Text.js content instead of upstream's
newer file, while the (non-conflicting) config.js was reconciled correctly.

Fix Text.js at the source to match upstream's graduated behavior instead of
resurrecting retired flags:
- Drop the ReactNativeFeatureFlags import.
- Collapse the reduceDefaultPropsInText()-gated TextImplNoDefaultProps /
  TextImplLegacy branches into the single TextImplNoDefaultProps
  implementation (upstream's permanent behavior since react#55292).
- Compute shouldUseLinkRole unconditionally, without the retired
  shouldUseLinkRoleForPressableText() guard (upstream's permanent
  behavior since react#55121).
- Preserve this fork's macOS-only borderRadius/backgroundColor spill
  workaround, now present once instead of duplicated across both branches.

No feature-flag config or codegen changes were needed/made since the
registry already omitted these flags correctly.
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.

3 participants