Skip to content
Browse files

MDL-13244 - weblib - Add 'summary' attribute to print_table()

  • Loading branch information...
1 parent 34f06f7 commit bb4bab500b445d1c5b5bb261936b11a97dd97f1c fmarier committed Jan 31, 2008
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/weblib.php
View
4 lib/weblib.php
@@ -4625,6 +4625,7 @@ function print_png($url, $sizex, $sizey, $return, $parameters='alt=""') {
* <li>$table->class - class attribute to put on the table
* <li>$table->id - id attribute to put on the table.
* <li>$table->rowclass[] - classes to add to particular rows.
+ * <li>$table->summary - Description of the contents for screen readers.
* </ul>
* @param bool $return whether to return an output string or echo now
* @return boolean or $string
@@ -4684,6 +4685,9 @@ function print_table($table, $return=false) {
$tableid = empty($table->id) ? '' : 'id="'.$table->id.'"';
$output .= '<table width="'.$table->width.'" ';
+ if (!empty($table->summary)) {
+ $output .= " summary=\"$table->summary\"";
+ }
$output .= " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class boxalign$table->tablealign\" $tableid>\n";
$countcols = 0;

0 comments on commit bb4bab5

Please sign in to comment.
Something went wrong with that request. Please try again.