Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    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

    Thread Starter soceuro

    (@soceuro)

    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 🙁

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    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

    Thread Starter soceuro

    (@soceuro)

    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

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    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

    Thread Starter soceuro

    (@soceuro)

    Tanks Tobias,

    Best regards.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome!

    Regards,
    Tobias

    Thread Starter soceuro

    (@soceuro)

    I send you by mail the translation to pt-PT Portuguese of Portugal.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    very cool! I’ll check it out this evening and then add it to the plugin!

    Thanks,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: WP-Table Reloaded] Code not valid’ is closed to new replies.