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

Talkback shouldn't read double tap to activate for the labels that are not clickable #4790

Closed
KolliAnitha opened this issue Dec 16, 2022 · 10 comments · Fixed by #5027
Closed
Assignees
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@KolliAnitha
Copy link

KolliAnitha commented Dec 16, 2022

Describe the bug
Talkback shouldn't read double tap to activate for the labels that are not clickable

To Reproduce
Steps to reproduce the behavior:
Enable Talkback

  1. Login to Oppia as Admin
  2. Click on any of the topic 'Place Values'
  3. Focus will be on the Nav bar topic title

Expected behavior
Talkback should read topic title and not double tap to activate as it is not clickable

Environment
Device/emulator being used: Oneplus nord2 5g
Android or SDK version (e.g. Android 5 or SDK 21): Android version 12
App version (you can get this through system app settings or via the admin controls menu in-app): 0.10-beta-5e64fae55e

@BenHenning
Copy link
Member

Ah, is this just specific to the title part of the nav bar @KolliAnitha? I'm not sure why that's marked as clickable since you're correct in that it doesn't do anything. This might have to do with text marqueeing.

@KolliAnitha
Copy link
Author

@BenHenning, For Topic: title, Chapter title talkback reads double tap to activate but they are not performing any action.

@BenHenning
Copy link
Member

Got it. Thanks for clarifying @KolliAnitha.

In this case, I think we should look into why such toolbars are not clickable and see if we can disable it to avoid the confusion.

@XichengSpencer
Copy link
Collaborator

Hi @BenHenning, in the code there is a listener added to the entire toolbar which causes this issue. And the only thing this listener does is set the title.isSelected to true. I didn't see anywhere else use this listener to do something and by removing this listener the app works fine. Should I go ahead to remove the listener?

@XichengSpencer
Copy link
Collaborator

Hi @BenHenning, I think that listener is served for the marquee effect. As it is designed when tapping the topic, the marquee effect will happen once, therefore the listener and "double tap to activate" will be there.

However, a minor bug here will be that the effect is triggered by textview.isSelected=true in the listener, but we never set it back to false. So if there is a long title, users only have one chance to see the entire title as they enter the activity/fragment. The marquee will only be triggered again if they go back and reenter.

@rt4914
Copy link
Contributor

rt4914 commented May 15, 2023

The reason why it is clickable is as follows:

  • If the title / topic name is too long that it does not fit in the toolbar, then the title will perform a marquee effect which means that the title will move from right-left to show the full title. Now once it has finished one full cycle, it will stop but the user can again play it by clicking on the title/toolbar.
  • That's the reason why it is clickable and therefore the talkback is giving correct output. We can update the implementation of toolbar to be something to fix this but the talkback is working as expected.

cc: @BenHenning @XichengSpencer @KolliAnitha @seanlip

@rt4914 rt4914 added the Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. label May 15, 2023
@adhiamboperes
Copy link
Collaborator

The reason why it is clickable is as follows:

  • If the title / topic name is too long that it does not fit in the toolbar, then the title will perform a marquee effect which means that the title will move from right-left to show the full title. Now once it has finished one full cycle, it will stop but the user can again play it by clicking on the title/toolbar.
  • That's the reason why it is clickable and therefore the talkback is giving correct output. We can update the implementation of toolbar to be something to fix this but the talkback is working as expected.

cc: @BenHenning @XichengSpencer @KolliAnitha @seanlip

From my own investigation into the issue, there's not really much we can do to override the "double tap to activate" announcement. This is controlled by device-side VERBOSITY settings, and it is recommended that as developers we should not remove these, as users need them to understand the app. If the user sets the Verbosity to "Low" in Accessibility -> Talkback -> Settings -> Verbosity -> Speak usage hints, this would not be read.

@adhiamboperes adhiamboperes added Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels May 30, 2023
@BenHenning
Copy link
Member

Can we disable marquee when an accessibility manager is active? That seems like the ideal approach since a marquee effect is likely to not be very helpful, anyway, and the readout will probably be more useful.

@BenHenning BenHenning removed the Issue: Needs Clarification Indicates that an issue needs more detail in order to be able to be acted upon. label Jun 6, 2023
@XichengSpencer
Copy link
Collaborator

Thanks Ben for the suggestion, I will look into it.

XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jun 8, 2023
# Conflicts:
#	app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt
XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jun 9, 2023
XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jun 16, 2023
XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jun 20, 2023
XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jun 27, 2023
XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Jul 12, 2023
…ppia#4790

� Conflicts:
�	app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt
@BenHenning
Copy link
Member

@adhiamboperes this is marked as blocked, but the blocked columns aren't filled in--could you clarify what this is blocked on?

XichengSpencer added a commit to XichengSpencer/oppia-android that referenced this issue Aug 29, 2023
…ppia#4790

� Conflicts:
�	app/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivityPresenter.kt
adhiamboperes pushed a commit that referenced this issue Sep 15, 2023
Fix #4790 For toolbars that have marquee effects, add additional checks
so that the effect will only be enabled when the accessibility service
is not on.
Also updated the existing test for the marquee effect. The test now
checks if the effect is set and activated correctly depending on the
accessibility service status.
Update the test setting to ensure that test behavior is correctly
simulated.

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation

Whenever users use vocal assisting tools such as talkback, the
accessibility service we inject in the field will be enabled. We will
choose either to use a marquee effect for visual display, or just pure
vocal display when the user enables the service.

For a toolbar that doesn't have an individual view for the toolbar
title, setting 'onNavgation..listener' will make the whole toolbar
clickable, and talkback will read "double click.."-
While we want to keep the navigation function, we can use getChildAt(0)
to set the listener to just the nav icon.
 
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->

- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
Exploration Activity:

- Normal:


https://github.com/oppia/oppia-android/assets/74568012/74f6eaf8-8560-4d1a-bfb4-d378177e31b6

- Talkback On:


https://github.com/oppia/oppia-android/assets/74568012/11285aee-ed5e-4355-97b1-c18df646efd7

Topic Fragment:

- Talkback On:


https://github.com/oppia/oppia-android/assets/74568012/f8cec635-b1c3-4540-afcb-990a42a9a38b


## Issue with Espresso test:
when readerOff, toolbar.title.click() behaves different from manual
test.

- Video record for manual test 

Listener function is set and is called when click is performed.
Regardless of title length, is selected will always be modified.


https://github.com/oppia/oppia-android/assets/74568012/7f9a04b6-e3e3-4803-9465-89543b091458


- Video record for espresso test 
     Listener function is set but not called when click is performed.
     The isSelected attribute does not been modified after click
    


https://github.com/oppia/oppia-android/assets/74568012/c2984b5f-c9fe-4a35-a36f-27d05a935210

## Solution to Solve Error in Espresso Tests.

- Setting the accessibility service before starting the activity solves
accessibility service not correctly set except in TopicFragmentTest.
**Reason** The set listener code in the app executes before setting the
accessibility service in the test.

- Add markSpotlightSeen before the start of the activity.
**Reason** The spotlight might cause the toolbar unable to reach to
simulate a click.
@adhiamboperes adhiamboperes added this to the 1.0 Global availability milestone Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Development

Successfully merging a pull request may close this issue.

6 participants