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

[ASDisplayNode] Implement accessibilityViewIsModal #1858

Merged
merged 5 commits into from
Jun 1, 2020

Commits on May 28, 2020

  1. [ASDisplayNode] Implement accessibilityViewIsModal

    A PR to add support for `accessibilityViewIsModal` in `CollectAccessibilityElements`.
    
    If in a list of subnodes more than 1 subnode has `accessibilityViewIsModal` marked as `YES`, then the node with the highest index in `subnodes` will be the one that is considered modal. This behavior matches UIKit.
    
    If the value of `accessibilityViewIsModal` changes, we need to clear all the cached `accessibilityElements` from that view up. I added this in ASDisplayNode’s `setAccessibilityViewIsModal` method. Note that if we ship `ASExperimentalDoNotCacheAccessibilityElements` then we can remove the invalidation step.
    
    Finally, I changed all the tests to ask the view for accessibilityElements, not the node. This is a better representation of what will really happen when UIKit asks a node’s view for its accessibility elements. It also allowed me to test that clearing the accessibilityElements was working.
    rcancro committed May 28, 2020
    Configuration menu
    Copy the full SHA
    353ec60 View commit details
    Browse the repository at this point in the history
  2. add some experiment checks

    rcancro committed May 28, 2020
    Configuration menu
    Copy the full SHA
    54ca0cf View commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. Configuration menu
    Copy the full SHA
    e12766c View commit details
    Browse the repository at this point in the history
  2. Fix tests

    rcancro committed May 29, 2020
    Configuration menu
    Copy the full SHA
    4d2fe0f View commit details
    Browse the repository at this point in the history
  3. remove debug code

    rcancro committed May 29, 2020
    Configuration menu
    Copy the full SHA
    0dbc606 View commit details
    Browse the repository at this point in the history