From 33151632646e692b6e402568808512f6e2a13171 Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 21 May 2024 18:34:05 +0200 Subject: [PATCH] wip #6927 --- js/quiz.accessibility.js | 4 ++++ js/quiz.screens.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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(); -- 2.39.5