Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accessibilityElements not cleared on relayout #1161

Closed
ay8s opened this issue Oct 4, 2018 · 1 comment
Closed

accessibilityElements not cleared on relayout #1161

ay8s opened this issue Oct 4, 2018 · 1 comment
Labels

Comments

@ay8s
Copy link
Collaborator

ay8s commented Oct 4, 2018

When not using Yoga a display views accessibilityElements isn't cleared when a node's layout is changed. If you add nodes during the layout transition, new nodes aren't accessible.

Looks like Yoga works correctly with calculateLayoutFromYogaRoot: implementing the following...

  // Reset accessible elements, since layout may have changed.
  ASPerformBlockOnMainThread(^{
    [(_ASDisplayView *)self.view setAccessibilityElements:nil];
  });

Curious where is best to call similar logic in the non Yoga layout code?

@ay8s ay8s added the bug label Oct 4, 2018
@ay8s
Copy link
Collaborator Author

ay8s commented Oct 17, 2018

For now I have commented out...

if (_accessibilityElements == nil) {
NSMutableArray *accessibilityElements = [[NSMutableArray alloc] init];
CollectAccessibilityElementsForView(self, accessibilityElements);
SortAccessibilityElements(accessibilityElements);
_accessibilityElements = accessibilityElements;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant