-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ASDisplayNode] Ensure accessibilityElementsHidden is respected before returning accessibilityElements to UIKit. #795
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
Conversation
# Conflicts: # Source/Details/_ASDisplayViewAccessiblity.mm # Source/Private/ASDisplayNode+UIViewBridge.mm # Source/Private/_ASPendingState.mm
🚫 CI failed with log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this!
Tests/ASDisplayNodeTests.mm
Outdated
// XCTAssertEqualObjects(@"Awesome things will happen", node.accessibilityAttributedHint.string, @"accessibilityAttributedHint is broken %@", hasLoadedView); | ||
// XCTAssertEqualObjects(@"1 of 2", node.accessibilityAttributedValue.string, @"accessibilityAttributedValue is broken %@", hasLoadedView); | ||
// } | ||
if (@available(iOS 11.0, *)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might break some build systems on Xcode 8.3. We'll adopt this soon, but it should be done as a single diff rather than in smaller changes. Could you keep AS_AT_LEAST_IOS11 for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea where this comes from tbo. I know I had that when submitting my last PR but you changed it and I thought pulling from master would keep your changes. Will change this back next week!
Thanks @fruitcoder! I'll merge this as soon as the CI lets me... |
@maicki @Adlai-Holler it appears there are ongoing reliability problems with CI. Is there any way I can be added as an admin for this project in order to be able to trigger build restarts? It's definitely the top issue affecting developer velocity for GitHub contributors right now. If you guys can push this without waiting on CI or otherwise get it to run, it would be great to close this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@garrettmoon Can you help out with the question from @appleguy |
@garrettmoon I know you're very busy right now - no worries if it takes a little while to get to this. We do have a whole lot of PRs blocked on CI though, and it would be good to at least disable the blocking aspect of it to allow dev to continue if it's not practical to fix the CI soon. Specifically this would be only for people with authorization to merge. I think we can self-police to make sure things build during the review process, as there would be extra caution used when operating without CI. |
I just noticed a problem using my fork #a11yHiddenElements with my current project. It might be my setup but after I set a node's |
@fruitcoder Did you figure out the problem you mentioned above? Should we go ahead and merge this PR? |
@nguyenhuy Don‘t merge! I still haven‘t found out why the a11y elements aren‘t coming back when Sent with GitHawk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as request-changes so we know not to land until we figure this out.
I don't have any bandwidth right now to dig into this with you in the next few days @fruitcoder, sorry! I really wish I did 😞
@maicki has a lot of experience working with accessibility. Maybe he can look at it?
@fruitcoder let us know if you had any other observations here. It would be great to merge if possible, though we should probably close out if there is an investigation needed that we don't have time to pursue. |
I just tried to run the branch again and the results are the same. After setting the |
Having the same issue in a different project. Was playing around |
Most of this code comes from an old PR that @fruitcoder put up TextureGroup#795 2 years ago. When creating our array of accessibilityElements, we need to respect the value of `accessibilityElementsHidden`. If the value of this property changes, we need to invalidate the cached accessibility elements (unless we are in the experiment that doesn’t cache `accessibilityElements`). I created a simple test app and made sure this matched UIKit’s implementation. I also added a test case that changes the value of `accessibilityElementsHidden` and makes sure the proper accessibilityElements are returned.
I was having similar issues with cached accessibility elements when working on |
Most of this code comes from an old PR that @fruitcoder put up #795 2 years ago. When creating our array of accessibilityElements, we need to respect the value of `accessibilityElementsHidden`. If the value of this property changes, we need to invalidate the cached accessibility elements (unless we are in the experiment that doesn’t cache `accessibilityElements`). I created a simple test app and made sure this matched UIKit’s implementation. I also added a test case that changes the value of `accessibilityElementsHidden` and makes sure the proper accessibilityElements are returned.
#1859 landed, so hopefully |
) Most of this code comes from an old PR that @fruitcoder put up TextureGroup#795 2 years ago. When creating our array of accessibilityElements, we need to respect the value of `accessibilityElementsHidden`. If the value of this property changes, we need to invalidate the cached accessibility elements (unless we are in the experiment that doesn’t cache `accessibilityElements`). I created a simple test app and made sure this matched UIKit’s implementation. I also added a test case that changes the value of `accessibilityElementsHidden` and makes sure the proper accessibilityElements are returned.
Check whether node has
accessibilityElementsHidden
set before returningaccessibilityElements
to UIKit