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 talkback navigation support for links and header #22447

Closed
wants to merge 2 commits into from

Conversation

yangweigbh
Copy link

@yangweigbh yangweigbh commented Nov 28, 2018

Summary

  1. add role description for heading
  2. add talkback navigation support for link and header

Fixes #22440

Test Plan:

  1. talkback link navigation for accessibilityRole="link"
  2. talkback heading navigation for accessibilityRole="header"
  3. talkback reading heading suffix for accessibilityRole="header"
  4. talkback link for view component with and without accessibilityHint

Changelog:

[Android] [Changed] - Add talkback navigation support for links and header

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 28, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link

@bartolkaruza bartolkaruza left a comment

Choose a reason for hiding this comment

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

LGTM

@bartolkaruza
Copy link

@yangweigbh can you rebase this onto master? There was a lot of work performed on automated tests recently and the extra coverage for this might be useful.

@yangweigbh
Copy link
Author

yangweigbh commented Dec 29, 2018

@bartolkaruza done, but the test_android workflow seems have bug with the following error

Task 'downloadJSCHeaders' not found in project ':ReactAndroid'.

@FLGMwt
Copy link
Contributor

FLGMwt commented Feb 4, 2019

Hi there! excited to see a fix for this issue 💃. Happy to help out if necessary, but the changes don't seem to be related to the CI failure. Might this just need a re-run of the build?

@yangweigbh
Copy link
Author

@FLGMwt hi, how to rerun the CI test, i seem to not have the permission to rerun the test

@FLGMwt
Copy link
Contributor

FLGMwt commented Feb 6, 2019

Sorry @yangweigbh, I'm not sure, just another outside consumer of RN. At the very least, I bet a new rebase or empty commit would trigger it.

@FLGMwt
Copy link
Contributor

FLGMwt commented Feb 14, 2019

@yangweigbh Looks like it still failed w/ the retry. Would you mind terribly rebasing this onto latest master again?

@yangweigbh
Copy link
Author

@FLGMwt @bartolkaruza thank god, i have finally pass all the CI test, can we merge this PR as this PR has been hang on too long !

@bartolkaruza
Copy link

@yangweigbh thanks for taking the time, I'll ask if someone can review this from the core team side over the weekend. Hang tight, you're almost there 👍

@bartolkaruza
Copy link

@yangweigbh could you add this

<RNTesterBlock title="Touchable with accessibilityRole = header">
          <View
            accessible={true}
            accessibilityLabel="I'm a header, so I read it instead of embedded text."
            accessibilityRole="header">
            <Text style={{color: 'green'}}>This is</Text>
            <Text style={{color: 'blue'}}>
              nontouchable accessible view with label.
            </Text>
          </View>
        </RNTesterBlock>

        <RNTesterBlock title="Touchable with accessibilityRole = link">
          <TouchableWithoutFeedback
            onPress={() =>
              ToastAndroid.show('Toasts work by default', ToastAndroid.SHORT)
            }
            accessibilityRole="link">
            <View style={styles.embedded}>
              <Text>Click me</Text>
              <Text>Or not</Text>
            </View>
          </TouchableWithoutFeedback>
        </RNTesterBlock>

to https://github.com/yangweigbh/react-native/blob/0b71d176fd13a6cc917d38fbbe4cad28db390809/RNTester/js/AccessibilityAndroidExample.android.js#L112 so that the example in RNTester is still complete after this PR?

I've tested your change on my end and it works like a charm. I'll ask someone to merge after you add that example.

@Tmarie77
Copy link

Tmarie77 commented Feb 23, 2019 via email

1. add role description for heading
2. add talkback navigation support for link and header
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

I added the example. I'm not an expert here but I trust @bartolkaruza.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 25, 2019
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.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by Wei Yang in b9d3743.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 25, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 25, 2019
grabbou pushed a commit that referenced this pull request Feb 27, 2019
Summary:
1. add role description for heading
2. add talkback navigation support for link and header

Fixes #22440
Pull Request resolved: #22447

Differential Revision: D14205822

Pulled By: cpojer

fbshipit-source-id: 86bfc3bfc851f3544b1962012abaf8d1a357a9d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Accessibility]when accessibilityRole set to header on android, no heading suffix pronounced in talkback
8 participants