-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve UIAccessiblityContainer / -accessibilityElements override support #1525
Conversation
5faa3f5
to
6579d5b
Compare
🚫 CI failed with log |
I'll do a thorough review later, but here are some thoughts on the ability to override
|
@nguyenhuy Thanks for your thoughts:
|
75d911a
to
18928c9
Compare
Hmm I don't think exposing For Ignore this bit if you already considered this, but I've noticed that we invalidate One last thing, I am pretty new to Texture, so let me know if there's anything I might've overlooked! |
I meant it's not about exposing It's the same with UIKit therefore I would like to not add a new API at least within this PR. To be able to overwrite you have to subclass within UIKit. We could pick that I think we should keep that behavior to invalidate the |
🚫 CI failed with log |
0f5be75
to
d40e069
Compare
🚫 CI failed with log |
6b338e7
to
d5753bf
Compare
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.
Good deal.
[_textNode.accessibilityElements[0] accessibilityLabel], _textNode.accessibilityLabel); | ||
XCTAssertTrue([[_textNode.accessibilityElements[0] accessibilityLabel] isEqualToString:_attributedText.string], | ||
@"First accessibility element incorrectly returns \n%@\n when it should be \n%@\n", | ||
[_textNode.accessibilityElements[0] accessibilityLabel], _textNode.accessibilityLabel); |
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.
Use XCTAssertEqual and XCTAssertEqualObjects so we get usable errors, throughout this PR.
5d68d97
to
a9aa0e1
Compare
a9aa0e1
to
f644525
Compare
5c93838
to
0a57392
Compare
61bb804
to
6e36749
Compare
- (NSInteger)accessibilityElementCount | ||
{ | ||
if ( | ||
!ASActivateExperimentalFeature(ASExperimentalTextNode2A11YContainer)) { |
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.
Blank line
🚫 CI failed with log |
Ah, we are not making What I was trying to get at was, I was prototyping making If that's not the case, never mind. Putting |
Generated by 🚫 Danger |
🚫 CI failed with log |
@maicki Can you rebase with master to fix the CI? |
The current state is quit old. Closing for now. |
ASDisplayNodes
to overwriteUIAccessibilityContainer
subclass methodsASDisplayNodes
that acting like a container we provide a default implementation and handling for subnodesASExperimentalExposeTextLinksForA11Y
which is by defaultNO
UIAccessibitliyContainer
methods within ASTextNode2 which based on theASExperimentalExposeTextLinksForA11Y
property will return the text as well as all links as accessibility elements