-
AuthorPosts
-
August 7, 2018 at 12:02 pm #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, 4 months ago by weasyweb2015.
August 8, 2018 at 8:37 am #994714Hey weasyweb2015,
Can you post a link to your website please so we can check the source code?
Best regards,
DudeAugust 8, 2018 at 12:42 pm #994924https://www.softiss.it/
- This reply was modified 6 years, 4 months ago by weasyweb2015.
August 8, 2018 at 1:23 pm #994944Hi,
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,
DudeAugust 8, 2018 at 3:15 pm #994993Hi,
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ünterAugust 8, 2018 at 3:37 pm #995012By 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.
-
AuthorPosts
- You must be logged in to reply to this topic.