From f8e5423c898761445a190e8cef6c1a8bc0b5ebaa Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Wed, 19 Aug 2020 12:42:59 -0700 Subject: [PATCH] Fabric: Make views with `accessibilityElementsHidden` form stacking context Summary: `accessibilityElementsHidden` property hides a subtree starting from the node with this prop from VoiceOver and TalkBack, so the node with this prop should form the stacking context (otherwise the children will mount as siblings and the property will not have an effect). Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D23202220 fbshipit-source-id: d87dfab5f791219551c1eb90cdf3b3fa86f9c51f --- ReactCommon/react/renderer/components/view/ViewShadowNode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp b/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp index 2085b7faf4ead0..f4d504f126889a 100644 --- a/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +++ b/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp @@ -49,6 +49,7 @@ void ViewShadowNode::initialize() noexcept { viewProps.yogaStyle.display() == YGDisplayNone || viewProps.getClipsContentToBounds() || isColorMeaningful(viewProps.shadowColor) || + viewProps.accessibilityElementsHidden || viewProps.importantForAccessibility != ImportantForAccessibility::Auto; bool formsView = isColorMeaningful(viewProps.backgroundColor) ||