diff --git a/js/questionset.js b/js/questionset.js
index 3602de9..10cc730 100644
--- a/js/questionset.js
+++ b/js/questionset.js
@@ -45,8 +45,9 @@ H5P.QuestionSet = function (options, contentId, contentData) {
'
" tabindex="-1">' +
+ ' + ", " + texts.unansweredText %>" tabindex="-1" ' +
+ ' <% if (disableBackwardsNavigation) { %> aria-disabled="true" <% } %>' +
+ ' >' +
' <% } %>' +
' ' +
' <% } else if (progressType == "textual") { %>' +
@@ -296,6 +297,7 @@ H5P.QuestionSet = function (options, contentId, contentData) {
for (var i = 0; i < questionInstances.length; i++) {
// Enable back and forth navigation in solution mode
+ toggleDotsNavigation(true);
if (i < questionInstances.length - 1) {
questionInstances[i].showButton('next');
}
@@ -316,6 +318,16 @@ H5P.QuestionSet = function (options, contentId, contentData) {
}
};
+ /**
+ * Toggles whether dots are enabled for navigation
+ */
+ var toggleDotsNavigation = function (enable) {
+ console.log("toggle dots", enable);
+ $('.progress-dot', $myDom).each(function () {
+ $(this).attr('aria-disabled', enable ? 'false' : 'true');
+ });
+ };
+
/**
* Resets the task and every subcontent task.
* Used for contracts with integrated content.
@@ -329,6 +341,8 @@ H5P.QuestionSet = function (options, contentId, contentData) {
// Hide back and forth navigation in normal mode
if (params.disableBackwardsNavigation) {
+ toggleDotsNavigation(false);
+
// Check if first question is answered by default
if (i === 0 && questionInstances[i].getAnswerGiven()) {
questionInstances[i].showButton('next');