Hi,
thanks for your post, and sorry for the trouble.
Is the solution that we discussed in https://ww.wp.xz.cn/support/topic/tablepress-accessibility/ a couple weeks ago not working anymore?
Regards,
Tobias
Don’t think so. Here’s the code that’s in the functions.php file:
function ada_tablepress_add_summary( $table_attributes, $table, $render_options ) {
$table_attributes['summary'] = $table['description'];
return $table_attributes;
}
add_filter( 'tablepress_table_tag_attributes', 'ada_tablepress_add_summary', 10, 3 );
function ada_tablepress_add_scope( $tag_attributes, $table_id, $cell_content, $row_number, $col_number, $colspan, $rowspan ) {
if ( $row_idx === 1 ) {
$tag_attributes['scope'] = "col";
}
return $tag_attributes;
}
add_filter( 'tablepress_cell_tag_attributes', 'ada_tablepress_add_scope', 10, 7 );
</code.
Hi,
hhm, that’s strange. The code looks correct. Could you please check if the tables on that page are actually created by the Shortcode (and not just fixed HTML code)?
Regards,
Tobias
Yes, it’s definitely by shortcode.
Here are my thoughts.
I’m working within an environment where the server(s) are hosted within Pantheon. I have development, test, and live environments.
TablePress is installed and activated on all three. However, the page content, tables, and short codes area no where to be found on the “dev” server.
What I’ll do is input everything into the “dev” site and see what develops.
I’ll let you know the outcome.
Hi,
yes, that sounds good! Thanks!
Please also try with a minimal setup, i.e. only TablePress activated, and WordPress default theme like Twenty Sixteen, plus that extra code in the theme’s “functions.php”.
Regards,
Tobias