Hello Grace,
I don't think you can use a screen reader with the "Full screen pop-up with some
JavaScript security" option. Even if it was possible, screen readers might not interpret everything in a quiz, for example certain answers, images and buttons.
Why not just read the text yourself, as follows:
- Go to a quiz
-
Create a block
-
Configure block / Where the block appears / Display on page types: Any quiz module page
-
Put the code below in the HTML of the block's content.
Here's what you'll get:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
var utter = new SpeechSynthesisUtterance();
// MOST ELEMENTS
$("span, p, h1, h2, h3, h4, div.state, div.grade, div.prompt, div.rightanswer, div.r0, div.r1, div.specificfeedback, div.generalfeedback, tr, .questionflag.editable, div.validationerror").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
$(this).children("th").css('background-color', 'yellow');
$(this).children("td").css('background-color', 'yellow');
});
$("span, p, h1, h2, h3, h4, div.state, div.grade, div.prompt, div.rightanswer, div.r0, div.r1, div.specificfeedback, div.generalfeedback, tr, .questionflag.editable, div.validationerror").click(function() {
$(this).css('background-color', 'yellow');
$(this).css('cursor', 'default');
utter.text = $(this).text();
window.speechSynthesis.speak(utter);
});
$("span, p, h1, h2, h3, h4, div.state, div.grade, div.prompt, div.rightanswer, div.r0, div.r1, div.specificfeedback, div.generalfeedback, tr, .questionflag.editable, div.validationerror").mouseout(function() {
$(this).css('background-color', 'initial');
$(this).children("th").css('background-color', 'initial');
$(this).children("td").css('background-color', 'initial');
});
// BUTTON: CHECK
$("[value='Check']").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('color', 'yellow');
utter.text = "Check";
window.speechSynthesis.speak(utter);
});
$("[value='Check']").mouseout(function() {
$(this).css('color', 'white');
$(this).css('cursor', 'default');
});
// BUTTON: FINISH ATTEMPT
$("[value='Finish attempt ...']").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('color', 'yellow');
utter.text = "Finish attempt";
window.speechSynthesis.speak(utter);
});
$("[value='Finish attempt ...']").mouseout(function() {
$(this).css('color', 'white');
$(this).css('cursor', 'default');
});
// LINK: FINISH ATTEMPT
$(".endtestlink").mouseover(function() {
$(this).css('background-color', 'yellow');
$(this).css('cursor', 'help');
utter.text = "Finish attempt";
window.speechSynthesis.speak(utter);
});
$(".endtestlink").mouseout(function() {
$(this).css('background-color', 'initial');
$(this).css('cursor', 'default');
});
// MESSAGE: CLEAR MY CHOICE
$("a:contains('Clear my choice')").mouseover(function() {
$(this).css('background-color', 'yellow');
$(this).css('cursor', 'help');
utter.text = "Clear my choice";
window.speechSynthesis.speak(utter);
});
$("a:contains('Clear my choice')").mouseout(function() {
$(this).css('background-color', 'initial');
$(this).css('cursor', 'default');
});
// PHOTO
$("[alt='A version of Moodle']").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('border', '8px solid yellow');
});
$("[alt='A version of Moodle']").click(function() {
$(this).css('cursor', 'default');
utter.text = "A photo of Martins kids";
window.speechSynthesis.speak(utter);
});
$("[alt='A version of Moodle']").mouseout(function() {
$(this).css('border', 'none');
});
// BUTTON: RETURN TO ATTEMPT
$("button:contains('Return to attempt')").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
utter.text = "Return to attempt";
window.speechSynthesis.speak(utter);
});
$("button:contains('Return to attempt')").mouseout(function() {
$(this).css('background-color', '#ced4da');
$(this).css('cursor', 'default');
});
// BUTTON: SUBMIT ALL AND FINISH
$("button:contains('Submit all and finish')").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
utter.text = "Submit all and finish";
window.speechSynthesis.speak(utter);
});
$("button:contains('Submit all and finish')").mouseout(function() {
$(this).css('background-color', '#ced4da');
$(this).css('cursor', 'default');
});
// BUTTON: FINISH REVIEW
$("[value='Finish review']").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('color', 'yellow');
utter.text = "Finish review";
window.speechSynthesis.speak(utter);
});
$("[value='Finish review']").mouseout(function() {
$(this).css('color', 'white');
$(this).css('cursor', 'default');
});
// BUTTON: RE-ATTEMPT QUIZ
$("button:contains('Re-attempt quiz')").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
utter.text = "Re-attempt quiz";
window.speechSynthesis.speak(utter);
});
$("button:contains('Re-attempt quiz')").mouseout(function() {
$(this).css('background-color', '#ced4da');
$(this).css('cursor', 'default');
});
// BUTTON: ATTEMPT QUIZ NOW
$("button:contains('Attempt quiz now')").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
utter.text = "Attempt quiz now";
window.speechSynthesis.speak(utter);
});
$("button:contains('Attempt quiz now')").mouseout(function() {
$(this).css('background-color', '#ced4da');
$(this).css('cursor', 'default');
});
// BUTTON: CONTINUE THE LAST ATTEMPT
$("button:contains('Continue the last attempt')").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
utter.text = "Continue the last attempt";
window.speechSynthesis.speak(utter);
});
$("button:contains('Continue the last attempt')").mouseout(function() {
$(this).css('background-color', '#ced4da');
$(this).css('cursor', 'default');
});
// BREADCRUMB
$(".breadcrumb-item").mouseover(function() {
$(this).css('cursor', 'help');
$(this).css('background-color', 'yellow');
$(this).find("a").css("cursor", "help");
utter.text = $(this).find("a").text();
window.speechSynthesis.speak(utter);
});
$(".breadcrumb-item").mouseout(function() {
$(this).css('background-color', 'initial');
$(this).css('cursor', 'default');
});
});
</script>
<h4 class="questionflagtext" style="position:absolute;top:0;">Text to speech block</h4>