Skip to content

Commit e2fd9d4

Browse files
p-sunfacebook-github-bot
authored andcommitted
Group accessible views using the view hierarchy
Summary: In iOS when a parent UIView returns YES on [shouldGroupAccessibilityChildren](https://developer.apple.com/documentation/objectivec/nsobject/1615143-shouldgroupaccessibilitychildren), VoiceOver groups together the accessible children of the parent view, regardless of their position on screen. In iOS this defaults to NO. Reviewed By: sammy-SC Differential Revision: D23844265 fbshipit-source-id: eb99bf0873ccfd9fb196f8f7b6eafe055f6ae810
1 parent c015f48 commit e2fd9d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm

+5
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,11 @@ - (NSString *)accessibilityValue
569569

570570
#pragma mark - Accessibility Events
571571

572+
- (BOOL)shouldGroupAccessibilityChildren
573+
{
574+
return YES;
575+
}
576+
572577
- (NSArray<UIAccessibilityCustomAction *> *)accessibilityCustomActions
573578
{
574579
auto const &accessibilityActions = _props->accessibilityActions;

0 commit comments

Comments
 (0)