diff --git a/lib/tablelib.php b/lib/tablelib.php index 358e3dcea1e..e478263c29a 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -1232,20 +1232,26 @@ class flexible_table { $ariacontrols = trim($ariacontrols); if (!empty($this->prefs['collapse'][$column])) { - $linkattributes = array('title' => get_string('show') . ' ' . strip_tags($this->headers[$index]), - 'aria-expanded' => 'false', - 'aria-controls' => $ariacontrols, - 'data-action' => 'show', - 'data-column' => $column); + $linkattributes = [ + 'title' => get_string('show') . ' ' . strip_tags($this->headers[$index]), + 'aria-expanded' => 'false', + 'aria-controls' => $ariacontrols, + 'data-action' => 'show', + 'data-column' => $column, + 'role' => 'button', + ]; return html_writer::link($this->baseurl->out(false, array($this->request[TABLE_VAR_SHOW] => $column)), $OUTPUT->pix_icon('t/switch_plus', null), $linkattributes); } else if ($this->headers[$index] !== NULL) { - $linkattributes = array('title' => get_string('hide') . ' ' . strip_tags($this->headers[$index]), - 'aria-expanded' => 'true', - 'aria-controls' => $ariacontrols, - 'data-action' => 'hide', - 'data-column' => $column); + $linkattributes = [ + 'title' => get_string('hide') . ' ' . strip_tags($this->headers[$index]), + 'aria-expanded' => 'true', + 'aria-controls' => $ariacontrols, + 'data-action' => 'hide', + 'data-column' => $column, + 'role' => 'button', + ]; return html_writer::link($this->baseurl->out(false, array($this->request[TABLE_VAR_HIDE] => $column)), $OUTPUT->pix_icon('t/switch_minus', null), $linkattributes); } @@ -1664,6 +1670,7 @@ class flexible_table { 'data-sortable' => $this->is_sortable($column), 'data-sortby' => $column, 'data-sortorder' => $sortorder, + 'role' => 'button', ]) . ' ' . $this->sort_icon($isprimary, $order); } @@ -1861,7 +1868,7 @@ class flexible_table { $url = $this->baseurl->out(false, array($this->request[TABLE_VAR_RESET] => 1)); $html = html_writer::start_div('resettable mdl-right'); - $html .= html_writer::link($url, get_string('resettable')); + $html .= html_writer::link($url, get_string('resettable'), ['role' => 'button']); $html .= html_writer::end_div(); return $html; diff --git a/lib/templates/initials_bar.mustache b/lib/templates/initials_bar.mustache index ab87624b664..5bb8d2713d6 100644 --- a/lib/templates/initials_bar.mustache +++ b/lib/templates/initials_bar.mustache @@ -76,31 +76,20 @@
{{title}} -
+
+
- diff --git a/lib/templates/paging_bar.mustache b/lib/templates/paging_bar.mustache index 622285e7c10..845cef6b6cf 100644 --- a/lib/templates/paging_bar.mustache +++ b/lib/templates/paging_bar.mustache @@ -54,7 +54,7 @@