diff --git plugins/views_plugin_style_table.inc plugins/views_plugin_style_table.inc index b65534b..45fefc7 100644 --- plugins/views_plugin_style_table.inc +++ plugins/views_plugin_style_table.inc @@ -20,6 +20,7 @@ class views_plugin_style_table extends views_plugin_style { $options['override'] = array('default' => TRUE); $options['sticky'] = array('default' => FALSE); $options['order'] = array('default' => 'asc'); + $options['summary'] = array('default' => ''); return $options; } @@ -250,5 +251,12 @@ class views_plugin_style_table extends views_plugin_style { '#suffix' => '', '#value' => t('Place fields into columns; you may combine multiple fields into the same column. If you do, the separator in the column specified will be used to separate the fields. Check the sortable box to make that column click sortable, and check the default sort radio to determine which column will be sorted by default, if any. You may control column order and field labels in the fields section.'), ); + + $form['summary'] = array( + '#title' => 'Summary attribute in the html table for accessibility', + '#type' => 'textarea', + '#default_value' => isset($this->options['summary']) ? $this->options['summary'] : '', + ); + } } diff --git theme/theme.inc theme/theme.inc index f261fba..aa759d0 100644 --- theme/theme.inc +++ theme/theme.inc @@ -385,6 +385,8 @@ function template_preprocess_views_view_table(&$vars) { drupal_add_js('misc/tableheader.js'); $vars['class'] .= " sticky-enabled"; } + + $vars['summary'] = check_plain($options['summary']); } /** diff --git theme/views-view-table.tpl.php theme/views-view-table.tpl.php index a991aec..8172727 100644 --- theme/views-view-table.tpl.php +++ theme/views-view-table.tpl.php @@ -15,7 +15,7 @@ * @ingroup views_templates */ ?> -