Fix: Improve TalkBack content description for concept card links
Explanation
Fix #5915: Improve TalkBack reading for concept card links
This PR updates the accessibility content description for the
<oppia-noninteractive-skillreview> custom HTML tag.
Earlier, TalkBack skipped the concept card link values. Now, TalkBack consistently reads:
“<skill_id> concept card”
This improves the screen-reader experience in:
- Hint section
- Solution section
- Flashback solution section
What this fixes
TalkBack was not reading concept-card links correctly because the custom HTML tag did not provide a clear accessibility description. This PR fixes the issue and makes the content accessible for learners using screen readers.
What was changed
Updated ConceptCardTagHandler.getContentDescription()
→ Now returns a clean, consistent description using only theskill_id.
Updated SolutionViewModel
→ Now uses CustomHtmlContentHandler.getContentDescription() together with ConceptCardTagHandler to ensure correct accessibility parsing across hint and solution screens.
Additional note
This PR also includes an auto-format update to scripts/assets/kdoc_validity_exemptions.textproto
generated automatically by ktlint. No functional changes were made.
Testing done
Tested TalkBack behavior in all places where concept-card links appear:
- Hint section
- Solution section
- Flashback mode
TalkBack now reads the concept card link:
- Exactly once
- In the correct format
- With the correct text
Ready for review
Screen recording demonstrating TalkBack reading concept card links correctly in all 3 places: 🔗https://drive.google.com/file/d/1y6pqNhccfw5rjqeOtr_VNsF78jvSTvPN/view?usp=sharing
Essential Checklist
- [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 files have their rationale included in the PR explanation.
- [x] The PR follows the style guide.
- [x] The PR does not contain any unnecessary code changes from Android Studio (reference).
- [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).
I have signed the CLA.
Hi! This is my first PR.
The Oppiabot and other automated checks are failing on my PR.
I verified my changes and everything seems correct.
Could you please approve the workflows or rerun the failing checks when possible?
Thank you!
Hi @CodeWithSangeeta, I checked your fauling CI checks and saw there are failing tests. Some for the code paths you changed have existing regression tests related to talkback/content descriptions, and the tests either need to be updated to have the latest content description, or help verify whether the fix is correct.
I clicked on the failing test shards and searched "failures", e.g.:
The Wiki also has a section on static checks and understanding CI failures, FYI.
Thank you for explaining the failing tests and for rerunning the workflows.
I understand now that the failures are due to UI tests still expecting the old TalkBack content descriptions. I will update the failing test files to match the new content descriptions from my change.
Really appreciate your help and guidance!
Hi! I’ve updated both StateFragmentTest and ExplorationActivityTest to match the new TalkBack concept card text and pushed the fix. The CI checks should rerun automatically now. Thanks again for the guidance!
Hi @adhiamboperes ,just a gentle follow-up on this PR. I’ve updated the failing tests based on the earlier feedback and pushed the fixes. Please let me know if anything else is needed from my side. Thank you!