Skip to content

Commit

Permalink
Fabric: Make views with accessibilityElementsHidden form stacking c…
Browse files Browse the repository at this point in the history
…ontext

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
  • Loading branch information
shergin authored and facebook-github-bot committed Aug 19, 2020
1 parent 7d7903c commit f8e5423
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit f8e5423

Please sign in to comment.