Skip to content

Commit

Permalink
Revert "HFP-3687 fix screen readers scoreBar double read" (#123)
Browse files Browse the repository at this point in the history
This reverts commit 463bb78.
  • Loading branch information
VildeStabell authored Oct 2, 2023
1 parent 3b4ac97 commit 809a3ac
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/h5p-true-false.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ H5P.TrueFalse = (function ($, Question) {
// Create feedback widget
var score = self.getScore();
var scoreText;
var scoreBarLabel = params.l10n.scoreBarLabel;

toggleButtonState(score === MAX_SCORE ? State.FINISHED_CORRECT : State.FINISHED_WRONG);

Expand All @@ -295,11 +294,10 @@ H5P.TrueFalse = (function ($, Question) {
}
else {
scoreText = params.l10n.score;
scoreBarLabel = ''; // HFP-3687: avoid screen readers reading seemingly duplicate labels
}
// Replace relevant variables:
scoreText = scoreText.replace('@score', score).replace('@total', MAX_SCORE);
self.setFeedback(scoreText, score, MAX_SCORE, scoreBarLabel);
self.setFeedback(scoreText, score, MAX_SCORE, params.l10n.scoreBarLabel);
answerGroup.reveal();
};

Expand Down

0 comments on commit 809a3ac

Please sign in to comment.