From: soufiane Date: Tue, 21 May 2024 16:34:05 +0000 (+0200) Subject: wip #6927 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=33151632646e692b6e402568808512f6e2a13171;p=fluidbook-toolbox-quiz.git wip #6927 --- diff --git a/js/quiz.accessibility.js b/js/quiz.accessibility.js index a5b3510..85c4fa1 100644 --- a/js/quiz.accessibility.js +++ b/js/quiz.accessibility.js @@ -43,6 +43,10 @@ QuizAccessibility.prototype = { if(!status) { $el.hide() } + }, + + setTabindex: function(tabindex) { + this.activeScreen.find(".screen a").attr('tabindex',tabindex) } } diff --git a/js/quiz.screens.js b/js/quiz.screens.js index 926cc67..6a81e01 100644 --- a/js/quiz.screens.js +++ b/js/quiz.screens.js @@ -77,12 +77,13 @@ QuizScreens.prototype = { let review = $this.sendUserAnswers(); // Si la revue instantanée est activée, on affiche les résultats if ($this.quiz.data.instantReview && !['country', 'email', 'text'].includes($this.getActiveScreenType())) { - $this.activeScreen.find(".screen a").attr('tabindex','-1') $this.instantReview(review); } else { // Sinon, on passe directement à la question suivante $this.nextQuestion(); } + $this.quiz.accessibility.setTabindex(-1) + $this.activeScreen.find(".screen a").attr('tabindex','-1') } else { // Bouton continuer, on était dans la revue instantanée, on passe à la question suivante $this.quiz.animations.stopInstantReviewAnimation();