MDL-53858 quiz accessibility: nav block should have role='navigation'
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 18 Apr 2016 16:37:03 +0000 (17:37 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 18 Apr 2016 16:37:03 +0000 (17:37 +0100)
mod/quiz/attemptlib.php

index 2977355..d03f92c 100644 (file)
@@ -1653,7 +1653,9 @@ class quiz_attempt {
 
         $bc = new block_contents();
         $bc->attributes['id'] = 'mod_quiz_navblock';
-        $bc->title = get_string('quiznavigation', 'quiz');
+        $bc->attributes['role'] = 'navigation';
+        $bc->attributes['aria-labelled-by'] = 'mod_quiz_navblock_title';
+        $bc->title = html_writer::span(get_string('quiznavigation', 'quiz'), '', array('id' => 'mod_quiz_navblock_title'));
         $bc->content = $output->navigation_panel($panel);
         return $bc;
     }