Add role and screenReaderFocusable to prop diffing for View component (#51332)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51332

See title

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D74747715

fbshipit-source-id: dc0380b0402d6023971a902f22d44b87bad0edde
This commit is contained in:
Nick Lefever authored and Facebook GitHub Bot committed 2025-05-14 15:43:33 -07:00
1 parent b6d7451291
commit 09832198cc
1 file changed
+9
@@ -10,6 +10,7 @@
#include <algorithm>
#include <react/featureflags/ReactNativeFeatureFlags.h>
#include <react/renderer/components/view/accessibilityPropsConversions.h>
#include <react/renderer/components/view/conversions.h>
#include <react/renderer/components/view/propsConversions.h>
#include <react/renderer/core/graphicsConversions.h>
@@ -574,6 +575,14 @@ folly::dynamic HostPlatformViewProps::getDiffProps(
result["renderToHardwareTextureAndroid"] = renderToHardwareTextureAndroid;
}
if (screenReaderFocusable != oldProps->screenReaderFocusable) {
result["screenReaderFocusable"] = screenReaderFocusable;
}
if (role != oldProps->role) {
result["role"] = toString(role);
}
if (opacity != oldProps->opacity) {
result["opacity"] = opacity;
}