-
Notifications
You must be signed in to change notification settings - Fork 541
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
Fix #4848 Content Description Generation for Content and SelectionInteractionContent ViewModels #5704
Fix #4848 Content Description Generation for Content and SelectionInteractionContent ViewModels #5704
Conversation
…content-description-update
Hi @adhiamboperes, PTAL. I have integrated the
Previously, when processing certain tags (e.g.,
Previously, the generated content description was: While the inner text was correctly appended, the hyperlink (
I would like clarification on the final approach for handling tags where attribute values are important. Additionally, if there are any other tags (besides Thanks! @manas-yu, AFAIK, the tag is the only one with attributes that are meaningful for talkback. I think that your approach in the PR is sufficient to handle this case. |
Coverage ReportResultsNumber of files assessed: 7 Passing coverageFiles with passing code coverage
Exempted coverageFiles exempted from coverage
|
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 19 MiB (old), 19 MiB (new), 564 bytes (Added) APK download size (estimated): 17 MiB (old), 17 MiB (new), 866 bytes (Added) Method count: 260321 (old), 260323 (new), 2 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6830 (old), 6830 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 18 MiB (old), 18 MiB (new), 568 bytes (Added) Configuration hdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 49 KiB (old), 49 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 45 KiB (old), 45 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 86 KiB (old), 86 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 57 KiB (old), 57 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 63 KiB (old), 63 KiB (new), 0 bytes (No change) AlphaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 660 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 50 bytes (Removed) Method count: 115840 (old), 115834 (new), 6 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5798 (old), 5798 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 11 MiB (old), 11 MiB (new), 660 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) BetaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 440 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 257 bytes (Removed) Method count: 115846 (old), 115840 (new), 6 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5798 (old), 5798 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 440 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) GaExpand to see flavor specificsUniversal APKAPK file size: 11 MiB (old), 11 MiB (new), 364 bytes (Added) APK download size (estimated): 10 MiB (old), 10 MiB (new), 243 bytes (Removed) Method count: 115846 (old), 115840 (new), 6 (Removed) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5798 (old), 5798 (new), 0 (No change)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 10 MiB (old), 10 MiB (new), 364 bytes (Added) Configuration hdpiAPK file size: 43 KiB (old), 43 KiB (new), 0 bytes (No change) Configuration ldpiAPK file size: 44 KiB (old), 44 KiB (new), 0 bytes (No change) Configuration mdpiAPK file size: 38 KiB (old), 38 KiB (new), 0 bytes (No change) Configuration tvdpiAPK file size: 73 KiB (old), 73 KiB (new), 0 bytes (No change) Configuration xhdpiAPK file size: 50 KiB (old), 50 KiB (new), 0 bytes (No change) Configuration xxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) Configuration xxxhdpiAPK file size: 55 KiB (old), 55 KiB (new), 0 bytes (No change) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @manas-yu! Nice cleanup. I just have one minor comment.
app/src/main/java/org/oppia/android/app/player/state/StatePlayerRecyclerViewAssembler.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/player/state/itemviewmodel/ContentViewModel.kt
Show resolved
Hide resolved
…oppia-android into get-content-description-update
Thanks @adhiamboperes PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @manas-yu.
Explanation
Fix #4848
This PR addresses post-PR review issues from #5614 by refining content description generation. The key updates include:
The
getContentDescription
function is now utilized inContentViewModel
andSelectionInteractionContentViewModel
, ensuring accurate content descriptions with the necessarycustomTagHandlers
ContentViewModel
: HandlesCUSTOM_LIST_LI_TAG
,CUSTOM_LIST_OL_TAG
,CUSTOM_LIST_UL_TAG
,CUSTOM_IMG_TAG
,CUSTOM_CONCEPT_CARD_TAG
, andCUSTOM_MATH_TAG
SelectionInteractionContentViewModel
: HandlesCUSTOM_IMG_TAG
Improved handling of tags where content resides in attributes, such as anchor tags:
<a href="https://example.com">Click here</a>
, ensuring proper extraction of meaningful descriptionsHandled edge cases in
CustomHtmlContentHandler
to improvegetContentDescription
logic, addressing inconsistencies and included comments for better understanding.Essential Checklist