Remove shouldUseLinkRoleForPressableText feature flag - #55121
Closed
fabriziocucci wants to merge 1 commit into
Closed
Remove shouldUseLinkRoleForPressableText feature flag#55121fabriziocucci wants to merge 1 commit into
fabriziocucci wants to merge 1 commit into
Conversation
|
@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
fabriziocucci
force-pushed
the
export-D90385104
branch
from
January 13, 2026 19:50
bdee49c to
7619437
Compare
|
This pull request has been merged in 68e5b4e. |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Changelog: [Android][Fixed] - Set accessibilityRole to "link" for pressable Text components by default
This diff removes the
shouldUseLinkRoleForPressableTextfeature flag since it has been tested in FB4A for a month withdefaultValue: true.The flag was introduced to automatically set
accessibilityRole="link"for pressable Text components by default. This behavior is now the default.Changes:
ReactNativeFeatureFlags.config.jsText.js(2 locations), nowshouldUseLinkRoleis computed directly without the feature flagReactNativeFeatureFlagsOverrides_Facebook.jsText-test.jsto remove flag mocking and only test the enabled behaviorjs1 featureflags --updateReviewed By: javache
Differential Revision: D90385104