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

[Signup] TalkBack Terms of Service disclaimer read twice #10510

Closed
designsimply opened this issue Sep 20, 2019 · 5 comments · Fixed by #11109
Closed

[Signup] TalkBack Terms of Service disclaimer read twice #10510

designsimply opened this issue Sep 20, 2019 · 5 comments · Fixed by #11109

Comments

@designsimply
Copy link
Contributor

designsimply commented Sep 20, 2019

Steps to reproduce:

  1. Go to Settings > Accessibility > TalkBack and turn on "Use service".
  2. In the WordPress app, go to the log in screen.
  3. Double tap the "Sign up for WordPress.com" button.

Result: the Terms of Service disclaimer is read aloud twice but should only be read aloud once. (14s)

tos-disclaimer-on-signup-screen

Tested with WPAndroid 13.2 on Pixel 3 Android 9.

/hat tip @mchowning for the report (internal reference: p77Llu-c0a-p2)

@hafizrahman
Copy link
Contributor

hafizrahman commented Oct 16, 2019

In my test, TalkBack first said "By signing up, you agree to our Terms of Service", then next it said "By signing up, you agree to Our Terms of Service button. Double tap to activate."

I did some reading but couldn't find anything specific about why it would behave that way, except that it seems to just do that: Read whatever is the first text on the view, then what is written on the element that gets the first focus. It just happens that the first text and the button is the same in this case.

I tried the example code on https://androidwave.com/bottom-sheet-dialog-fragment-in-android/ and it behaves the same there.

To test this behavior further, I tested adding a TextLabel above the button. TalkBack would then read the TextView's text first ("Hello hello"), then say "By signing up, you agree to Our Terms of Service button. Double tap to activate." (just once in this case):

Screen Shot 2019-10-16 at 19 47 33

That seemed like a better solution, except that I'm not sure if we want to change the design by adding an additional text.

Another option I found is to use setContentDescription, like below for example:

        termsOfServiceText.setText(Html.fromHtml(String.format(
                context.getResources().getString(R.string.signup_terms_of_service_text), "<u>", "</u>")));

        termsOfServiceText.setContentDescription("Terms of Service");

In this situation, TalkBack would then say: "By signing up, you agree to Our Terms of Service. Terms of Service button. Double tap to activate."

The second "Terms of Service" mention there is from the string entered with setContentDescription, and TalkBack adds the "button. Double tap to activate" part after it. TalkBack will still say things twice, but the result sounds more natural to me. I'd suggest doing this, what do you think?

@shiki
Copy link
Member

shiki commented Oct 22, 2019

@hafizrahman That's a clever solution. However, after that first dictation, it does not seem to be possible to get the “By signing up,...” text dictated anymore. When navigating between controls while that view is open, only the “Terms of Service” button is dictated. 🙁

It looks like we can get around this by setting a title right after the content view is set:

        setContentView(layout);
        setTitle("Sign up with WordPress.com");

When it's like this, the “Sign up with WordPress.com” is dictated first and then the button.

Please note that I haven't fully tested this code so I'm not sure if this is how the final code should look like. 😄

@jd-alexander
Copy link
Contributor

I just did some investigation into this issue and I think the behavior is fine. For `Buttons' we shouldn't double-tap them as the instructions state that the action should be "Tap to activate". So what I think is happening is when you perform a double-tap the Accessibility framework is doing the announcement twice. By design, I think the double-tap functionality should be disabled but it isn't so my expectation is that users will use the single tap to navigate so this shouldn't be an issue and we can probably close this. What do you think?

@shiki
Copy link
Member

shiki commented Dec 9, 2019

I just did some investigation into this issue and I think the behavior is fine.

Not sure I understand. Do you mean that TalkBack reading it twice is fine? 🤔

when you perform a double-tap the Accessibility framework is doing the announcement twice

Last time I tested this, the double announcement happened when the popup was shown.

By design, I think the double-tap functionality should be disabled

IIRC, the double-tap is there because the Terms of Service is a link that opens another page. So I don't think it should be disabled if that's still true. 🙂

@jd-alexander
Copy link
Contributor

jd-alexander commented Dec 10, 2019

Hey @shiki

Not sure I understand. Do you mean that TalkBack reading it twice is fine? 🤔

No I meant that TalkBack expects the user to only Tap once so the double tap isn't normal.

IIRC, the double-tap is there because the Terms of Service is a link that opens another page. So I don't think it should be disabled if that's still true. 🙂

Understood! I will look into how this can be done from the TalkBack level. Thanks for the feedback 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment