Skip to content

Conversation

@tamaskozmer
Copy link
Contributor

Test plan:

  1. Enable TalkBack on an Android device
  2. Open SpeedGrader in Teacher app
  3. Navigate to the grading screen for an assignment
  4. Focus on the grade slider
  5. Verify that moving the slider announces the grade value (e.g., "Grade: 56 percent" or "Grade: 17.5 points")
  6. Verify that the TextField can be focused and announces the current grade value followed by the hint (e.g., "Grade: 58 percent, Write percentage here")
  7. Verify that moving the slider does NOT announce confusing text changes like "41 replaced 56"
  8. Test with both percentage-based and points-based grading

refs: MBL-19238

affects: Teacher

release note: Improved accessibility for SpeedGrader grading slider - screen readers now announce grade values clearly without confusing duplicate announcements

  • I have tested this code
  • Dark/light mode has been considered and tested as needed
  • I have considered how this change will work on landscape and tablets
  • I have considered and tested accessibility

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR enhances accessibility for the SpeedGrader grading interface by adding semantic descriptions to sliders and text fields for both percentage and points-based grading. The changes improve screen reader support and overall accessibility compliance.

Positive Aspects

✅ Good addition of accessibility string resources with proper formatting
✅ Consistent approach applied to both percentage and points grading types
✅ Proper use of clearAndSetSemantics to provide custom accessibility descriptions
✅ Dynamic content descriptions that reflect current grade values
✅ The string resource refactoring in DiscussionDetailsFragment.kt is clean and appropriate

Issues Found

  • Potential precision loss in percentage calculation (line 701): Using toIntOrNull() may truncate decimal values. Verify if decimal percentages should be supported.
  • Questionable focused = false semantic (lines 710, 857): Setting focus state explicitly may interfere with natural focus management by accessibility services.
  • No-op onClick handler (lines 711, 857): The onClick action returns true without performing any action, which may confuse accessibility services about what action is available.

Recommendations

  1. Review the semantic modifiers: The focused = false and empty onClick handler pattern may not follow Compose accessibility best practices. Consider whether these are necessary or if the content description alone is sufficient.

  2. Test with TalkBack: Ensure the changes work well with Android's TalkBack screen reader, particularly the interaction between the custom semantics and the underlying text field behavior.

  3. Consider decimal support: Verify whether the grading system should support decimal percentages (e.g., 95.5%) and adjust the toIntOrNull() logic if needed.

Testing Suggestions

  • Test with TalkBack enabled to verify the announcements are clear and accurate
  • Verify that focus management works correctly when navigating between grading fields
  • Test edge cases like empty fields, very large numbers, and decimal values

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

📊 Code Coverage Report

ℹ️ Student

  • PR Coverage: 43.56%
  • Master Coverage: N/A

ℹ️ Teacher

  • PR Coverage: 25.61%
  • Master Coverage: N/A

ℹ️ Pandautils

  • PR Coverage: 22.88%
  • Master Coverage: N/A

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

🧪 Unit Test Results

✅ 📱 Teacher App

  • Tests: 369 total, 0 failed, 0 skipped
  • Duration: 33.872s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 2515 total, 0 failed, 0 skipped
  • Duration: 45.476s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 2884
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Mon, 12 Jan 2026 10:36:49 GMT

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Teacher Install Page

Copy link
Contributor

@kdeakinstructure kdeakinstructure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA 👍

@tamaskozmer tamaskozmer merged commit 85579d0 into master Jan 12, 2026
27 checks passed
@tamaskozmer tamaskozmer deleted the MBL-19238-slider-a11y-issue branch January 12, 2026 11:02
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.

4 participants