MDL-72896 Accessibility: Make html_table responsive

The tables are generated by html_table will responsive across viewports
This commit is contained in:
Huong Nguyen
2021-11-09 09:41:27 +07:00
parent d135a1200a
commit ffca35b805
7 changed files with 18 additions and 6 deletions
+7
View File
@@ -2321,6 +2321,10 @@ class html_writer {
}
$output .= html_writer::end_tag('table') . "\n";
if ($table->responsive) {
return self::div($output, 'table-responsive');
}
return $output;
}
@@ -2772,6 +2776,9 @@ class html_table {
*/
public $captionhide = false;
/** @var bool Whether to make the table to be scrolled horizontally with ease. Make table responsive across all viewports. */
public $responsive = true;
/**
* Constructor
*/