Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #994367

    when i analyze my site with w3c validator i have these error

    CSS: background-image: Parse Error.
    The contentinfo role is unnecessary for element footer.
    No space between attributes. g’ height=”133″width=”92″ ite
    The type attribute is unnecessary for JavaScript resources.
    The main role is unnecessary for element main.
    The banner role is unnecessary for element header.
    Duplicate ID milestone-.

    this is enfold code not mine.
    i have these problems in every site, obviously
    when you fix these problems?

    • This topic was modified 6 years, 3 months ago by weasyweb2015.
    #994714

    Hey weasyweb2015,

    Can you post a link to your website please so we can check the source code?

    Best regards,
    Dude

    #994924
    https://www.softiss.it/
    • This reply was modified 6 years, 3 months ago by weasyweb2015.
    #994944

    Hi,

    To fix the warning

    
    The type attribute is unnecessary for JavaScript resources.
    

    you can try to add this code to the child themee functions.php file:

    
    add_filter('script_loader_tag', 'clean_script_tag');
      function clean_script_tag($input) {
      $input = str_replace("type='text/javascript' ", '', $input);
      return str_replace("'", '"', $input);
    }
    

    Reference: https://wordpress.stackexchange.com/questions/287830/remove-type-attribute-from-script-and-style-tags-added-by-wordpress and https://css-tricks.com/forums/topic/clean-up-script-tags-in-wordpress/ – however the code may break some scripts.

    The warnings “The XX role is unnecessary for element YY” are triggered by the schema.org markup. You can deactivate the markup in the theme option panel. However it’s just a warning and you can ignore it (it doesn’t make the website invalid).

    I’ll look into the other two errors (“CSS: background-image: Parse Error.” and “No space between attributes.”) and report back asap.

    Best regards,
    Dude

    #994993

    Hi,

    Thanks for reporting this.

    A fix for the height/width:

    In file config-templatebuilder\avia-shortcodes\image\image.php line 554:

    
    if(!empty($img_w)) $hw .= 'width="'.$img_w.'"';
    

    replace with:

    
    if(!empty($img_w)) $hw .= ' width="'.$img_w.'"';
    

    A fix for Section – empty inline background-image property:

    in file config-templatebuilder/avia-shortcodes/section.php around line 812:

    
    			else
    				{
    					$attach = "scroll";
    					$background .= "background-image: {$gradient_val}";
    

    replace with:

    
    			else if( ! empty( $gradient_val ) )
    				{
    					$attach = "scroll";
    					$background .= "background-image: {$gradient_val}";
    

    Fixes should be in the net update.

    Best regards,
    Günter

    #995012

    By the way – i guess that role attribut are only warnings – so ignore them – because on wai aria (Accessible Rich Internet Applications) usage is good standard. And for my opinion it is more important to have these roles in a html document than to fullfill w3c validity.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.