]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6927
authorsoufiane <soufiane@cubedesigners.com>
Thu, 23 May 2024 08:40:42 +0000 (10:40 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 23 May 2024 08:40:42 +0000 (10:40 +0200)
js/quiz.screens.js
views/screens/question_multiple.blade.php

index fcf7c39326e134eefe95fa74cba38e9a5532384a..cf7336e080dd140ce68712627f9226f5b805349b 100644 (file)
@@ -92,6 +92,13 @@ QuizScreens.prototype = {
                 $this.nextQuestion();
             }
         });
+
+        $(".list-item").removeAttr("tabindex")
+        if(this.getActiveScreenType() === "multiple") {
+            this.activeScreen.find(".list-item").each(function(index) {
+                $(this).attr('tabindex', index++)
+            })
+        }
     },
 
     instantReview: function (review) {
index ade6646ac176b575b7e74b991b7cabf39a50eebe..95894b611b43a40fe266565a3dba840791dd13cf 100644 (file)
@@ -8,7 +8,7 @@
                 @php($tabindex = 0)
                 @foreach($question['answers'] as $key => $answer)
                     @php($tabindex++)
-                    <li class="list-item" tabindex="{{$tabindex}}">
+                    <li class="list-item">
                         <input type="{{ $question['multiple'] ? 'checkbox' : 'radio' }}"
                                name="answer"
                                id="question-{{$position.$key}}" class="none" value="{{$key}}">