Skip to content

Commit

Permalink
Group accessible views using the view hierarchy
Browse files Browse the repository at this point in the history
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
  • Loading branch information
p-sun authored and facebook-github-bot committed Sep 25, 2020
1 parent c015f48 commit e2fd9d4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ - (NSString *)accessibilityValue

#pragma mark - Accessibility Events

- (BOOL)shouldGroupAccessibilityChildren
{
return YES;
}

- (NSArray<UIAccessibilityCustomAction *> *)accessibilityCustomActions
{
auto const &accessibilityActions = _props->accessibilityActions;
Expand Down

0 comments on commit e2fd9d4

Please sign in to comment.