diff --git a/mod/quiz/classes/output/edit_renderer.php b/mod/quiz/classes/output/edit_renderer.php index ce376dfb9ba..a2855247cc8 100644 --- a/mod/quiz/classes/output/edit_renderer.php +++ b/mod/quiz/classes/output/edit_renderer.php @@ -1035,7 +1035,7 @@ class edit_renderer extends \plugin_renderer_base { $namestr = $qtype->local_name(); $icon = $this->pix_icon('icon', $namestr, $qtype->plugin_name(), ['title' => $namestr, - 'class' => 'activityicon', 'alt' => ' ', 'role' => 'presentation']); + 'class' => 'activityicon', 'alt' => $namestr]); $editicon = $this->pix_icon('t/edit', '', 'moodle', ['title' => '']); @@ -1073,8 +1073,7 @@ class edit_renderer extends \plugin_renderer_base { $configuretitle = get_string('configurerandomquestion', 'quiz'); $qtype = \question_bank::get_qtype($question->qtype, false); $namestr = $qtype->local_name(); - $icon = $this->pix_icon('icon', $namestr, $qtype->plugin_name(), ['title' => $namestr, - 'class' => 'icon activityicon', 'alt' => ' ', 'role' => 'presentation']); + $icon = $this->pix_icon('icon', $namestr, $qtype->plugin_name(), ['class' => 'icon activityicon']); $editicon = $this->pix_icon('t/edit', $configuretitle, 'moodle', ['title' => '']); $qbankurlparams = [ diff --git a/mod/quiz/tests/behat/editing_add.feature b/mod/quiz/tests/behat/editing_add.feature index 7fca18fe8bf..12ff21fcb54 100644 --- a/mod/quiz/tests/behat/editing_add.feature +++ b/mod/quiz/tests/behat/editing_add.feature @@ -242,3 +242,19 @@ Feature: Edit quiz page - adding things And I should see "Essay 02" on quiz page "3" And I should see "Random" on quiz page "4" And I should see "Essay for page 4" on quiz page "4" + + @accessibility @javascript + Scenario: Check the accessibility of the quiz questions page + Given the following "question categories" exist: + | contextlevel | reference | name | + | Course | C1 | Test questions | + And the following "questions" exist: + | questioncategory | qtype | name | questiontext | + | Test questions | truefalse | First question | Answer the first question | + | Test questions | truefalse | Other question | Answer the first question | + And quiz "Quiz 1" contains the following questions: + | question | page | + | First question | 1 | + When I reload the page + Then I should see "First question" + And the page should meet accessibility standards