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] Allow explicit setting of accessibilityElements #1807

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Apr 22, 2020

Since NSObject conforms to the informal accessibility protocol, ASDisplayNode has an inherited property for accessibilityElements. However, setting this property has no effect since ASDisplayNode overrides the accessibilityElements getter. Added a small change to the getter to check if the accessibilityElements property on ASDisplayNode has been explicitly set, and if so return that.

I also added a comment around _ASDisplayView’s setAccessibilityElements: method to clear up some (of my own) confusion.

Since `NSObject` conforms to the informal accessibility protocol, `ASDisplayNode` has an inherited property for `accessibilityElements`. However, setting this property has no effect since `ASDisplayNode` overrides the `accessibilityElements` getter. Added a small change to the getter to check if the `accessibilityElements` property on `ASDisplayNode` has been explicitly set, and if so return that.

I also added a comment around  `_ASDisplayView`’s `setAccessibilityElements:` method to clear up some (of my own) confusion.
@nguyenhuy
Copy link
Member

Our CI pipeline has been a bit flaky lately. testThatViewControllerFrameIsRightAfterCustomTransitionWithNonextendedEdges fails about 20% of the time, GH's "re-run jobs" button would fail 100% of the time, and some jobs (like examples-pt4 in this PR) would fail without any details. @rcancro ran examples-pt4 locally and didn't hit any issues. I'm going to land this diff as is. Those flakiness issues should be looked at later on.

@nguyenhuy nguyenhuy merged commit 508bd2b into TextureGroup:master Apr 24, 2020
piotrdebosz pushed a commit to getstoryteller/Texture that referenced this pull request Mar 1, 2021
…ureGroup#1807)

* [ASDisplayNode] Allow explicit setting of accessibilityElements

Since `NSObject` conforms to the informal accessibility protocol, `ASDisplayNode` has an inherited property for `accessibilityElements`. However, setting this property has no effect since `ASDisplayNode` overrides the `accessibilityElements` getter. Added a small change to the getter to check if the `accessibilityElements` property on `ASDisplayNode` has been explicitly set, and if so return that.

I also added a comment around  `_ASDisplayView`’s `setAccessibilityElements:` method to clear up some (of my own) confusion.

* comment tweak

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

Successfully merging this pull request may close these issues.

None yet

3 participants