W3C HTML Validation
-
I have run some tests to see if the theme is w3c valid and I noticed a few errors.
Issue 1:
At the logo there is an issue with the srset and sizes attributes when a retina image is also set.in my case the_custom_logo() function returns
<img width="152" height="92" src="https://example.com/wp-content/uploads/2018/04/logo.png" class="custom-logo" alt="alt here" itemprop="logo" srcset="https://example.com/wp-content/uploads/2018/04/logo.png 1x, https://example.com/wp-content/uploads/2018/06/logo-ret.png 2x" sizes="(max-width: 152px) 100vw, 152px">
while it should not return the sizes part because of the 1x and 2x in the srcset
I went to you demos though and I can’t see this anywhere. Any ideas what causes this? I use the latest version of the theme. Do the demos use the latest version?
The function oceanwp_header_retina_logo returns the array $attr which in my case has also [sizes] => (max-width: 152px) 100vw, 152px
Placing
unset($attr['sizes']);
before the return works doesn’t return the sizes attribute and validates correctly.Issue 2:
In the function oceanwp_get_schema_markup() the line
$schema = 'itemprop="datePublished" pubdate';
triggers one error because of the pubdate.I will update this thread in case I find anything else
- The topic ‘W3C HTML Validation’ is closed to new replies.