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

[RNMobile] Improve AztecWrapper RN talkback support #25384

Merged

Conversation

jd-alexander
Copy link
Contributor

@jd-alexander jd-alexander commented Sep 16, 2020

Fixes wordpress-mobile/gutenberg-mobile#918
Aztec Android PR wordpress-mobile/AztecEditor-Android#927
Gutenberg Mobile PR wordpress-mobile/gutenberg-mobile#2630

Description

Currently the RichText will focus automatically without needing double tapping. This was taking place due to the AccessibilityDelegate in Aztec requesting focus on hover, so that behavior was removed. This PR, resolves this by utilizing the mentioned fix within Aztec along with enabling the RichText component via the ReactAztecManager so that the double-tap to activate behavior becomes active.

Testing

This was first tested in Aztec by ensuring that the AztecText view no longer auto focuses on hover. The commit hash of the Aztec PR was then utilized within Gutenberg to verify that the editor would no longer perform this auto-focusing.

For further testing here are the instructions.

  1. Enable TalkBack.
  2. Hover over a text component that's powered by the RichText such as a paragraph block.
  3. Notice that it only reads the contents of the block but it no longer shows a blinking cursor or opens the keyboard.
  4. Perform the announced action of double tapping to activate and then the cursor and the keyboard becomes active.

Screenshots

Video Example

Concerns

The only change made in this PR I was wondering about is the removal of setFocusable(false) I tried to utilize git blame to figure out why this was added in the first place but I wasn't able to find a commit with enough details, hence I am pointing it out here.
Update this was being discussed here as well. I will look into it more.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

Review

  • Currently this PR references an Aztec commit hash so this needs to be updated before merging.

@jd-alexander jd-alexander changed the title Rnmobile/improve talkback support [RNMobile] Improve RichText talkback support Sep 16, 2020
@jd-alexander
Copy link
Contributor Author

@cameronvoell @mchowning could you please add the relevant labels here for me 😄

@jd-alexander jd-alexander changed the title [RNMobile] Improve RichText talkback support [RNMobile] Improve AztecWrapper RN talkback support Sep 16, 2020
@mchowning mchowning added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Sep 16, 2020
Copy link
Contributor

@mchowning mchowning left a comment

Choose a reason for hiding this comment

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

Tested and working well. LGTM!

I also ran through the test steps for wordpress-mobile/gutenberg-mobile#1076 (which is the PR that added the aztecText.setFocusable(false) line in order to check for regressions, and I did not observe any problems. 👍

@guarani guarani self-requested a review September 18, 2020 20:03
Copy link
Contributor

@guarani guarani left a comment

Choose a reason for hiding this comment

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

Please ignore this PR review (it's just for testing GitHub Slack PR notifications)

@jd-alexander
Copy link
Contributor Author

@guarani could you merge this for me. Thanks 🙏

@guarani guarani merged commit d220d6c into WordPress:master Sep 24, 2020
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 24, 2020
@github-actions github-actions bot added this to the Gutenberg 9.1 milestone Sep 24, 2020
@guarani
Copy link
Contributor

guarani commented Sep 24, 2020

Done @jd-alexander

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve AztecWrapper RN TalkBack support.
3 participants