Viewing 6 replies - 1 through 6 (of 6 total)
  • You need to post this in the theme’s dedicated sub-forum.

    FYI: you can always find the correct sub-forum for any WP.org theme or plugin via its page in the Theme or Plugin Repository.

    Thread Starter ArtGoddess

    (@artgoddess)

    Hello @esmi, and thankyou for your answer.

    These W3C warnings are not theme related.

    The files that are called using type=”text/css” and type=”text/javascript” are javascript codes that are called independently from theme, and smiley and emoji styles.

    Of course most of the themes are calling also these files using the type attribute, generating a huge quantity of unnecesary warnings.

    I’m asking in this thread if it is possible to hide these attributes and achieve a better result in W3C. Many thanks!

    Thread Starter ArtGoddess

    (@artgoddess)

    wp-includes\class.wp-scripts.php

    $tag = "{$cond_before}{$before_handle}<script type='text/javascript' src='$src'></script>\n{$after_handle}{$cond_after}";

    Also wp-includes\class.wp-styles.php adds the type=’text/css’ attribute.

    If you feel that this is an issue within core WordPress and can replicate it using the current default theme with no plugins, then you can create a Trac ticket via https://core.trac.ww.wp.xz.cn/newticket

    Thread Starter ArtGoddess

    (@artgoddess)

    Even if I delete the type=’text/javascript’ from line 327 I can see that default WP Emojis javascript and css style, use type=”text/css” and type=”text/javascript”.

    Thank you @esmi, just reported here:
    https://core.trac.ww.wp.xz.cn/ticket/43111#ticket

    Many thanks!

    Thread Starter ArtGoddess

    (@artgoddess)

    Ok, seems it was already reported here: https://core.trac.ww.wp.xz.cn/ticket/42804

    Many thanks @esmi!

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

The topic ‘W3C validation warnings: type attribute’ is closed to new replies.