forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix oppia#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.
- Loading branch information
1 parent
b643538
commit 89e8032
Showing
10 changed files
with
515 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.