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

Fixed: Content labeling issue reported by the playstore. #3707

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Feb 15, 2024

Fixes #3700
Child Issue #3680

  • Added content descriptions for all views reported by the Play Store, including RecyclerView, dialog's itemView, pause/resume/stop buttons, and many more.
  • Created an extension function to handle both setting the content description to address Play Store accessibility issues and displaying hints to the user using ToolTipText. This function consolidates these tasks in one place, eliminating code duplication.
  • Added a few new contentDescription for views, which are shown in the below images, if you have any better suggestions for these contentDescripton, it would be welcome.

LanguageSelection
PauseButton
Stopabutton
StorageSelectionDialog

  • For the below change we do not have any direct function to get the navigationIcon from toolbar. So we make a helper function to get that view. Please read the code comments as this change has some conditions after closing some screens. For example, we previously changed this icon/contentDescription to the "+" button when opening the tabSwitcher. After closing the tabSwitcher, we reset the contentDescription to the default hamburger icon. To properly understand all the changes we have added appropriate comments on methods.
Back button descripton Back button descripton Back button descripton Back button descripton Back button description
Screenshot_20240216-123341 Screenshot_20240216-123346 Screenshot_20240216-123404 Screenshot_20240216-123417 Screenshot_20240216-123421
Screenshot_20240216-123426 Screenshot_20240216-123430 Screenshot_20240216-123435 Screenshot_20240216-123452 Screenshot_20240216-124930
  • For the ActionMode back button, there is no way I found yet to get the view so the description is not set for that (Might be that's why Play Store does not report for this view.). ActionMode activates, when you select one or more things(Zim files, history, etc) to delete. If you have any suggestions it would be welcome.
  • When SearchView is activated then it overrides the default behavior of navigationBackButton means it removes the contentDecripton from the navigationBackButton so it does not show when the searchView is activated but after searchView is closed it starts working normally. You can see this behavior in the Bookmarks screen, just a long click on the backButton when initially launching the screen you will see the description, after that click on the search icon and again try to long click on the back button you will not see the description. SearchView does not have its own backButton it internally overrides the behaviour of navigationBackButton.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (da897a1) 51.64% compared to head (b96ad45) 51.20%.
Report is 1 commits behind head on main.

❗ Current head b96ad45 differs from pull request most recent head 046f10f. Consider uploading reports for the commit 046f10f to get more accurate results

Files Patch % Lines
...ile/localFileTransfer/LocalFileTransferFragment.kt 61.53% 1 Missing and 4 partials ⚠️
...mhutti1/utils/storage/adapter/StorageViewHolder.kt 71.42% 2 Missing ⚠️
.../kiwix/kiwixmobile/core/main/CoreReaderFragment.kt 60.00% 0 Missing and 2 partials ⚠️
...va/org/kiwix/kiwixmobile/core/page/PageFragment.kt 66.66% 0 Missing and 2 partials ⚠️
...org/kiwix/kiwixmobile/language/LanguageFragment.kt 75.00% 0 Missing and 1 partial ⚠️
...va/org/kiwix/kiwixmobile/core/base/BaseFragment.kt 50.00% 0 Missing and 1 partial ⚠️
...rg/kiwix/kiwixmobile/core/main/CoreMainActivity.kt 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3707      +/-   ##
============================================
- Coverage     51.64%   51.20%   -0.44%     
+ Complexity     1237     1208      -29     
============================================
  Files           288      289       +1     
  Lines         10876    10912      +36     
  Branches       1459     1465       +6     
============================================
- Hits           5617     5588      -29     
- Misses         4303     4366      +63     
- Partials        956      958       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* Added content descriptions for all views reported by the Play Store, including RecyclerView, dialog's itemView, pause/resume/stop buttons, and many more.
* Created an extension function to handle both setting the content description to address Play Store accessibility issues and displaying hints to the user using ToolTipText. This function consolidates these tasks in one place, eliminating code duplication.
…mpat.setTooltipText throughout the code to eliminate redundancy. Additionally, removed comments related to the usage of this method, as the information is already provided in our extension function's comment.
* Added `contentDescription` for "+" button in TabSwitcher.
@kelson42
Copy link
Collaborator

No review, but we have to merge

@kelson42 kelson42 merged commit 746dd60 into main Feb 21, 2024
7 of 8 checks passed
@kelson42 kelson42 deleted the Fix#3700 branch February 21, 2024 05:59
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.

Content labeling issue reported by the playstore.
3 participants