Hi,
the summary attribute is not a required attribute for tables, it is optional.
You can use it in WP-Table Reloaded, if you want, by using the wp_table_reloaded_table_summary_arg filter hook.
Regards,
Tobias
It is not a required attribute for tables, but receive a warning in W3C Validator. If I change the code every time I update the plugin, I need to make that change 🙁
Hi,
can you provide a link to your site? I suspect that there’s something else going on. I have never gotten such a warning in the validator.
Regards,
Tobias
http://couzinatech.com/wp_table_reloaded.JPG
This is what the HTML Validator (Firefox Extension) show,
you are right the W3C don’t show this error, but this attribute make tables accessibility.
26.3. The summary element
Hi,
ah, ok, thanks for the screenshot.
As mentioned, if you really want to add a summary attribute, you can do so using the filter hook.
For example, use
function add_summary_attribute_to_tables( $summary, $table_id, $table ) {
return esc_attr( $table['description'] );
}
add_filter( 'wp_table_reloaded_table_summary_arg', 'add_summary_attribute_to_tables', 10, 3 );
This will add the table description that you entered in the backend in the summary attribute.
You can just paste this code into your theme’s “functions.php” to use it.
Best wishes,
Tobias
Hi,
no problem, you are very welcome!
Regards,
Tobias
I send you by mail the translation to pt-PT Portuguese of Portugal.
Hi,
very cool! I’ll check it out this evening and then add it to the plugin!
Thanks,
Tobias