diff --git a/css/questionset.css b/css/questionset.css
index 5e9cd9b..1786d12 100644
--- a/css/questionset.css
+++ b/css/questionset.css
@@ -125,6 +125,13 @@
transition: none;
}
+.qs-progress-announcer {
+ height: 0;
+ width: 0;
+ position: absolute;
+ overflow: hidden;
+}
+
.h5p-question .h5p-question-prev,
.h5p-question .h5p-question-finish,
.h5p-question .h5p-question-next {
diff --git a/js/questionset.js b/js/questionset.js
index 788b447..9d87537 100644
--- a/js/questionset.js
+++ b/js/questionset.js
@@ -31,6 +31,7 @@ H5P.QuestionSet = function (options, contentId) {
'
' +
'' +
'<% } %>' +
+ '' +
'' +
' <% for (var i=0; i
' +
' ' +
@@ -88,7 +89,8 @@ H5P.QuestionSet = function (options, contentId) {
finishButton: 'Finish',
textualProgress: 'Question: @current of @total questions',
jumpToQuestion: 'Jump to question %d',
- questionLabel: 'Question'
+ questionLabel: 'Question',
+ readSpeakerProgress: 'Question @current of @total'
},
endGame: {
showResultPage: true,
@@ -224,6 +226,17 @@ H5P.QuestionSet = function (options, contentId) {
$('.progress-dot:eq(' + questionNumber +')', $myDom).addClass('current');
}
+ // Announce question number of total, must use timeout because of buttons logic
+ setTimeout(function () {
+ var humanizedProgress = params.texts.readSpeakerProgress
+ .replace('@current', (currentQuestion + 1).toString())
+ .replace('@total', questionInstances.length.toString());
+
+ $('.qs-progress-announcer', $myDom)
+ .html(humanizedProgress)
+ .focus();
+ }, 0);
+
// Remember where we are
_updateButtons();
self.trigger('resize');
diff --git a/language/ar.json b/language/ar.json
index 5217dad..bd1d4e0 100644
--- a/language/ar.json
+++ b/language/ar.json
@@ -83,6 +83,11 @@
{
"label": "Copyright dialog question label",
"default": "Question"
+ },
+ {
+ "label": "Readspeaker progress",
+ "description": "May use @current and @total question variables",
+ "default": "Question @current of @total"
}
]
},
diff --git a/language/de.json b/language/de.json
index 82a29c6..a89cdba 100644
--- a/language/de.json
+++ b/language/de.json
@@ -88,6 +88,11 @@
{
"label": "Copyright dialog question label",
"default": "Question"
+ },
+ {
+ "label": "Readspeaker progress",
+ "description": "May use @current and @total question variables",
+ "default": "Question @current of @total"
}
]
},
diff --git a/language/fr.json b/language/fr.json
index 23f6fb9..ed64dc7 100644
--- a/language/fr.json
+++ b/language/fr.json
@@ -83,6 +83,11 @@
{
"label": "Copyright dialog question label",
"default": "Question"
+ },
+ {
+ "label": "Readspeaker progress",
+ "description": "May use @current and @total question variables",
+ "default": "Question @current of @total"
}
]
},
diff --git a/language/it.json b/language/it.json
index 8af2417..1e43746 100644
--- a/language/it.json
+++ b/language/it.json
@@ -83,6 +83,11 @@
{
"label": "Copyright dialog question label",
"default": "Question"
+ },
+ {
+ "label": "Readspeaker progress",
+ "description": "May use @current and @total question variables",
+ "default": "Question @current of @total"
}
]
},
diff --git a/language/nb.json b/language/nb.json
index 84783da..4702512 100644
--- a/language/nb.json
+++ b/language/nb.json
@@ -85,6 +85,11 @@
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
+ },
+ {
+ "label": "Fremdriftstekst for hjelpemiddelteknologi",
+ "description": "Kan bruke @current og @total variabler",
+ "default": "Deloppgave @current av @total"
}
]
},
diff --git a/language/nn.json b/language/nn.json
index 5e47a98..7f14bd7 100644
--- a/language/nn.json
+++ b/language/nn.json
@@ -85,6 +85,11 @@
{
"label": "Opphavsrett spørsmål-etikett",
"default": "Spørsmål"
+ },
+ {
+ "label": "Fremdriftstekst for hjelpemiddelteknologi",
+ "description": "Kan bruke @current og @total variabler",
+ "default": "Deloppgave @current av @total"
}
]
},
diff --git a/semantics.json b/semantics.json
index 1ce4c57..b60dbd0 100644
--- a/semantics.json
+++ b/semantics.json
@@ -165,6 +165,13 @@
"type": "text",
"label": "Copyright dialog question label",
"default": "Question"
+ },
+ {
+ "name": "readSpeakerProgress",
+ "type": "text",
+ "label": "Readspeaker progress",
+ "description": "May use @current and @total question variables",
+ "default": "Question @current of @total"
}
]
},