-
Notifications
You must be signed in to change notification settings - Fork 763
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
Add support for A11y headers in Litho. #573
Conversation
FYI @astreet @adityasharat . Please review. Thanks |
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 looks good to me, can you just add javadoc for the new prop at the inline, and javadoc for new classes? I'm also going to try to run this by @blavalla
@@ -1014,6 +1014,11 @@ public T importantForAccessibility(int importantForAccessibility) { | |||
return getThis(); | |||
} | |||
|
|||
public T accessibilityHeading(boolean isHeading) { |
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.
Can you add javadocs here?
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.
Done.
This looks good to me from an accessibility perspective. It's probably worth noting in the javadoc that this prop won't have any impact below API 19. |
Added javadoc. Please review. Thanks |
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.
@astreet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I submitted the PR for accessibility headers support : facebook#573 . Adding documentation now for the same.
Summary: <!-- Thanks for submitting a pull request! We appreciate you taking the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. --> I submitted the PR for accessibility headers support : #573 . Adding documentation now for the same. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. This should just be a brief oneline we can mention in our release notes: https://github.com/facebook/litho/releases --> Pull Request resolved: #579 Test Plan: <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, output of the test runner and how you invoked it (you've added tests, right?), screenshots/videos if the pull request changes UI. --> Reviewed By: colriot Differential Revision: D18725611 Pulled By: muraziz fbshipit-source-id: 3373e6b99e20f83cde44852ea6e95e7d65f6a2d2
Summary
Add support for Accessibility Headers in Litho.
This will help the users to choose to “Navigate by Headings” and ignore scrolling through each and every sub items under a heading. “Navigate based on Heading“ can be chosen from Local Context Menu with talkback on ( Gesture for local context menu - Swipe up then right).
ViewCompat and AccessibilityNodeInfoCompat have required API’s which can indicate that a view or corresponding accessibilityNode is an “Accessibility Heading” when talkback is enabled.
Changelog
Add support for Accessibility Headers in Litho.
Test Plan
Verified locally by switching talkback on and navigate by headers. It works fine and no crash found.