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

Add support for A11y headers in Litho. #573

Closed
wants to merge 3 commits into from

Conversation

anushreeag
Copy link
Contributor

@anushreeag anushreeag commented Jul 30, 2019

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.

@anushreeag
Copy link
Contributor Author

anushreeag commented Jul 30, 2019

FYI @astreet @adityasharat . Please review. Thanks

Copy link
Contributor

@astreet astreet left a 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) {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@blavalla
Copy link
Contributor

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.

@anushreeag
Copy link
Contributor Author

Added javadoc. Please review. Thanks

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@facebook-github-bot
Copy link
Contributor

@astreet merged this pull request in ce710ab.

anushreeag added a commit to anushreeag/litho that referenced this pull request Aug 4, 2019
I submitted the PR for accessibility headers support : facebook#573 . Adding documentation now for the same.
facebook-github-bot pushed a commit that referenced this pull request Nov 27, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants