oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Fix: Improve TalkBack content description for concept card links

Open CodeWithSangeeta opened this issue 3 weeks ago • 6 comments

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).

CodeWithSangeeta avatar Dec 04 '25 13:12 CodeWithSangeeta

I have signed the CLA.

CodeWithSangeeta avatar Dec 04 '25 16:12 CodeWithSangeeta

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!

CodeWithSangeeta avatar Dec 05 '25 11:12 CodeWithSangeeta

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.: Screenshot 2025-12-06 at 02 20 47

The Wiki also has a section on static checks and understanding CI failures, FYI.

adhiamboperes avatar Dec 05 '25 23:12 adhiamboperes

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!

CodeWithSangeeta avatar Dec 06 '25 08:12 CodeWithSangeeta

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!

CodeWithSangeeta avatar Dec 07 '25 15:12 CodeWithSangeeta

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!

CodeWithSangeeta avatar Dec 10 '25 09:12 CodeWithSangeeta