Skip to content

Accessibility Improvement : Remove focusing of AztecText control as it's unneeded in TalkBack mode.#927

Merged
jd-alexander merged 1 commit intodevelopfrom
issue-926/aztec_text_accessibility_issue
Sep 23, 2020
Merged

Accessibility Improvement : Remove focusing of AztecText control as it's unneeded in TalkBack mode.#927
jd-alexander merged 1 commit intodevelopfrom
issue-926/aztec_text_accessibility_issue

Conversation

@jd-alexander
Copy link
Copy Markdown
Contributor

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

Fixes #926

Findings

The AztecText view was focusing on hover during accessibility mode.

Solution

The solution was to modify the AztecTextAccessibilityDelegate that was intercepting the MotionEvent on hover since that triggered the delegate's logic which involved requesting the focus on the AztecText view.

Testing

  1. Open the example app.
  2. Enable TalkBack by long-pressing both the volume up & down key at the same time.
  3. Once it's enabled, hover over the example content of the AztecText view.
    I modified the string content from EXAMPLE to QUOTE so testing would be easier.
    aztec.sourceEditor?.displayStyledAndFormattedHtml(EXAMPLE)
  4. TalkBack should read out the entire content, but the view should not be focused until you double-tap it.
  5. Before TalkBack would say long-press the control as the first option but now it says tap as seen below.
  6. Ensure that tapping actually causes the cursor to become visible since the view is no longer going to be focused automatically.
Before After
</kbd

Screenshot

Before After

Video

Before After
Cursor blinking automatically Tap to activate cursor

Reviewing

Only 1 reviewer is needed but anyone can review.

Submitter Checklist

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.
  • I have considered adding accessibility improvements for my changes.
  • If it's feasible, I have added unit tests.
  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@jd-alexander jd-alexander changed the title removed focusing of AztecText control as it's unneeded. Accessibility Improvement : Remove focusing of AztecText control as it's unneeded in TalkBack mode. Sep 15, 2020
@jd-alexander jd-alexander marked this pull request as draft September 16, 2020 01:35
@jd-alexander jd-alexander marked this pull request as ready for review September 16, 2020 19:46
Copy link
Copy Markdown
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. Looks good! Nice work @jd-alexander ! 🎉

I also went through the test steps for #646, which is the PR adding the line you're removing, and I found no issues. :shipit:

@jd-alexander
Copy link
Copy Markdown
Contributor Author

Oh nice. Thanks @mchowning 🙇

@jd-alexander jd-alexander merged commit 5d983f8 into develop Sep 23, 2020
@jd-alexander jd-alexander deleted the issue-926/aztec_text_accessibility_issue branch September 23, 2020 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility : AztecText focuses on hover

2 participants