diff --git a/mod/feedback/classes/templates_table.php b/mod/feedback/classes/templates_table.php index 839b42e5694..e31b1ed3d33 100644 --- a/mod/feedback/classes/templates_table.php +++ b/mod/feedback/classes/templates_table.php @@ -62,7 +62,7 @@ class mod_feedback_templates_table extends core_table\flexible_table { $this->cmid = $baseurl->param('id'); $tablecolumns = [ 'template' => get_string('template', 'feedback'), - 'actions' => '', + 'actions' => html_writer::span(get_string('actions'), 'visually-hidden'), ]; $this->set_attribute('class', 'templateslist'); diff --git a/mod/feedback/manage_templates.php b/mod/feedback/manage_templates.php index 903b06218ab..ddf7468520e 100644 --- a/mod/feedback/manage_templates.php +++ b/mod/feedback/manage_templates.php @@ -74,12 +74,12 @@ $PAGE->activityheader->set_attrs([ "description" => '' ]); echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('templates', 'mod_feedback'), 3); +echo $OUTPUT->heading(get_string('templates', 'mod_feedback')); // First we get the course templates. $templates = feedback_get_template_list($course, 'own'); echo $OUTPUT->box_start('coursetemplates'); -echo $OUTPUT->heading(get_string('coursetemplates', 'mod_feedback'), 4); +echo $OUTPUT->heading(get_string('coursetemplates', 'mod_feedback'), 3); $baseurl = new moodle_url('/mod/feedback/use_templ.php', $params); $tablecourse = new mod_feedback_templates_table('feedback_template_course_table', $baseurl); @@ -88,7 +88,7 @@ echo $OUTPUT->box_end(); $templates = feedback_get_template_list($course, 'public'); echo $OUTPUT->box_start('publictemplates'); -echo $OUTPUT->heading(get_string('sitetemplates', 'mod_feedback'), 4); +echo $OUTPUT->heading(get_string('sitetemplates', 'mod_feedback'), 3); $tablepublic = new mod_feedback_templates_table('feedback_template_public_table', $baseurl); $tablepublic->display($templates); echo $OUTPUT->box_end(); diff --git a/mod/feedback/tests/behat/templates.feature b/mod/feedback/tests/behat/templates.feature index 433a28d99ba..e201843a33d 100644 --- a/mod/feedback/tests/behat/templates.feature +++ b/mod/feedback/tests/behat/templates.feature @@ -159,7 +159,7 @@ Feature: Saving, using and deleting feedback templates And "My course template" "text" should not exist in the ".coursetemplates" "css_element" And "No templates available yet" "text" should exist in the ".coursetemplates" "css_element" - @javascript + @javascript @accessibility Scenario: Manager can delete both course and public templates # Save feedback as both public and course template When I am on the "Learning experience course 1" "feedback activity" page logged in as manager @@ -173,9 +173,10 @@ Feature: Saving, using and deleting feedback templates And I choose "Save as template" in the open action menu And I set the field "Name" to "My course template" And I click on "Save" "button" in the ".modal-dialog" "css_element" - # Delete course template And I navigate to "Templates" in current page administration + And the "region-main" "region" should meet accessibility standards with "best-practice" extra tests And "My course template" "text" should exist in the ".coursetemplates" "css_element" + # Delete course template And I open the action menu in "My course template" "table_row" And I choose "Delete" in the open action menu And I should see "Are you sure you want to delete this template?"