Home › Forums › WoodMart support forum › fix erors from validator.w3.org
fix erors from validator.w3.org
- This topic has 40 replies, 2 voices, and was last updated 2 years, 12 months ago by Artem Temos.
-
AuthorPosts
-
September 6, 2021 at 8:52 am #316694
bigdropParticipantHi,
I need to fix errors that show on the validator.w3.org.
I managed to fix most of them but there are a couple of errors that I cannot fix.Just for example I will run the test for your demo and not my page.
You can see the results here https://validator.w3.org/nu/?doc=https%3A%2F%2Fwoodmart.xtemos.com%2F
There are 123 errors and 22 warnings.
The error 138, is the one that I need help with.
The error says: Element style not allowed as child of element body in this context.
How can I solve this issue?Also on error 46 it says Bad value for attribute srcset on element img: Must contain one or more image candidate strings.
How is it possible to solve this also?September 6, 2021 at 2:36 pm #316818
Artem TemosKeymasterHello,
Since our site is just a demo and not a working store we have a lot of links placeholders that generate the following errors https://gyazo.com/95b0198caffdcba6229b04590a40edd5
In a real store, you should have all links with real URLs.
Style tags can’t be fully eliminated from the code since they are required for a lot of dynamic styles like dropdown size, styles generated by WPBakery/Elementor, etc.
There are other errors like missed ALT attributes for images but you need to specify them on your website and it is not something that we should fix in our theme.Kind Regards
September 6, 2021 at 3:05 pm #316825
bigdropParticipantOk, let me ask this again.
I need help with the error 46. It says:
Error: Bad value for attribute srcset on element img: Must contain one or more image candidate strings.From line 1921, column 1; to line 1921, column 769
430px"/>↩<img width="430" height="491" src="https://z9d7c4u6.rocketcdn.me/wp-content/themes/woodmart/images/l…, https://z9d7c4u6.rocketcdn.me/wp-content/uploads/2016/09/product-furniture-4-2-430x491.jpg 430w" />↩</pic
And this is not a missing ALT error. The error is about the srcset
September 7, 2021 at 7:40 am #316928
Artem TemosKeymasterYes, the srcset is empty by default because the lazy loading option is activated. If you disable this option the srcset will be filled by default.
September 7, 2021 at 8:02 am #316937
bigdropParticipantThank you.
I see this style added in the code
<style id='woodmart-inline-css-inline-css'> .wd-5d49bf3be7bf0 svg {} .wd-5d49bf41277d5 svg {} .wd-5d49bf4fd9b6a svg {} </style>
I guess it does not do something specific. Is there a way to remove this part totally?
September 7, 2021 at 9:10 am #316944
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue?
Kind Regards
September 7, 2021 at 9:18 am #316946
bigdropParticipanthere it is
September 7, 2021 at 9:27 am #316950
Artem TemosKeymasterWe will fix this issue in our next theme update.
September 7, 2021 at 9:58 am #316958
bigdropParticipantIs it possible to have an early access to the fix. It is really crucial for me and I need it as soon as possible.
September 7, 2021 at 12:12 pm #316980
Artem TemosKeymasterTry to edit the following file
woodmart/inc/shortcodes/row-divider.php
and remove the following code https://take.ms/8l0BqSeptember 7, 2021 at 1:39 pm #317006
bigdropParticipantThat did not work.
I copied the file in the child theme folderwoodmart-child/inc/shortcodes/row-divider.php
and the deleted the part of the code that you mention but it did not change anything.
I still get the same error, I still see the below in my code.<style id='woodmart-inline-css-inline-css'> .wd-5d49bf3be7bf0 svg {} .wd-5d49bf41277d5 svg {} .wd-5d49bf4fd9b6a svg {} </style>
September 7, 2021 at 1:45 pm #317008
Artem TemosKeymasterYou just need to change this in the parent theme. Anyway this fix will be applied in our next theme update.
September 7, 2021 at 2:14 pm #317021
bigdropParticipantChanging it in the parent theme did the trick for me. Thank you.
One more question.
I also see this in the code<style id='rs-plugin-settings-inline-css'> #rs-demo-id {} </style>
how to fix this?
September 7, 2021 at 2:35 pm #317023
Artem TemosKeymasterThis code is generated by the Slider revolution. Sorry, but we don’t have a fix for this.
September 7, 2021 at 3:14 pm #317034
bigdropParticipantok thank you!
September 7, 2021 at 3:40 pm #317039
bigdropParticipantIf I use the megamenu option https://prnt.sc/1rhsnh1 or https://prnt.sc/1rhso6q
I get an errorError: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
When I check the code of the page I get this
<style data-type="vc_shortcodes-custom-css"></style>
Since it does not do anything can I just remove it somehow?Thank you!
The megamenu is currently not enabled on my site since it throws errors.
Even with the filewoodmart/inc/shortcodes/row-divider.php
edited as you suggested I still get the above error when I enable the mega menu.September 8, 2021 at 6:16 am #317122
Artem TemosKeymasterHi,
1. Mega menu CSS will be moved to a new file in our next theme update.
2. Could you please send us a link to the page where you see this empty style tag for WPBakery shortcode CSS?
Kind Regards
September 8, 2021 at 6:54 am #317130
bigdropParticipantI told you I see this empty tag as soon as I enable the mega menu like this https://prnt.sc/1rhsnh1 or https://prnt.sc/1rhso6q.
It is for the site forkid.gr but I have disabled the magamenu because it is causing the error.
If you help me to solve this I will reenable the megamenu.
When is the new theme update coming?
September 8, 2021 at 8:25 am #317141
Artem TemosKeymasterThe mega menu style tag will be fixed in our next update. Do you mean that this tag appears also when the mega menu is activated?
<style data-type="vc_shortcodes-custom-css"></style>
September 10, 2021 at 10:35 am #317671
bigdropParticipantThe above tag appears only when the mega menu is activated.
September 10, 2021 at 11:38 am #317691
Artem TemosKeymasterOK, this bug will be fixed in our next theme update too.
September 13, 2021 at 6:03 pm #318268
bigdropParticipantOk. When do you plan to publish the update?
September 14, 2021 at 6:11 am #318350
Artem TemosKeymasterWe don’t have an exact date yet but hope to release it next month.
September 22, 2021 at 4:28 pm #320386
bigdropParticipantHi,
I want to fix another error also.
When I check the demo website from wave.webaim.org
https://wave.webaim.org/report#/https://woodmart.xtemos.com/
I see the below error for the categories images
https://prnt.sc/1t8vqkwThis error is generated because the category element generates the bellow code:
<a href="https://woodmart.xtemos.com/product-category/clocks/" class="category-link wd-fill"></a>
This code does not contain any link so it show the error.
One solution would be to add the category name.
Another solution would be something like this<a href="https://woodmart.xtemos.com/product-category/clocks/" class="category-link wd-fill"><span class="sr-only">Clocks (aka category name)</span></a> <style> .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; } </style>
Solution found on stackoverflow.
Since accessibility is a very important issue I really need to fix this.
I want to use many elements of your theme but some of theme are not accessibility friendly.
Can you please tell which file to edit in the theme?
I am trying to edit this section https://prnt.sc/1t8w8kmSeptember 23, 2021 at 6:24 am #320471
Artem TemosKeymasterHello,
Yes, we will fix all empty links in our next theme update.
Kind Regards
October 22, 2021 at 10:29 am #326955
bigdropParticipantHi,
While checking this demo https://woodmart.xtemos.com/demo-alternative-energy/demo/alternative-energy/
on W3 validator I saw few more errors that has to do with how your theme handles staff.
You can see the results of the test hereError: CSS: background-image: The first argument to the linear-gradient function should be to left, not left. From line 1122, column 694; to line 1122, column 1210 t-enable"><div class="woodmart-row-gradient wd-fill" style="background-image:-webkit-linear-gradient(left , rg…80%);background-image:-ms-linear-gradient(left , rgb(142, 203, 222) 80% , rgb(255, 255, 255) 80%);"></div>
Also this errors
Error: Attribute ; not allowed on element div at this point. From line 1207, column 72; to line 1207, column 205 -wrapper"><div class="wd-video-poster" style="background-image:url(https://z9d7c4u6.rocketcdn.me/wp-content/uploads/2019/06/ae-video-img.jpg)";></div> Attributes for element div: Global attributes Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead. From line 1207, column 249; to line 1207, column 450 div></div><iframe src="https://player.vimeo.com/video/51589652?dnt=1&app_id=122963" width="500" height="281" f…meborder="0" title="Timelapse - Lighthouse (Oct 2012)" allow="autoplay; fullscreen" allowfullscreen></ifra
Is there a quick fix for the above errors?
Attachments:
You must be logged in to view attached files.October 22, 2021 at 1:28 pm #326999
Artem TemosKeymasterHello,
We will review the gradient error since it comes with JS library so our theme doesn’t control it.
The other one about backrgound-image property will be fixed in our next update.
As for the iframe error, it comes with WordPress standard shortcode so it also can’t be fixed in our theme scope.Kind Regards
November 15, 2021 at 8:35 am #331860
bigdropParticipantHello,
Just update the theme to 6.2.2 and now I have 2 new errors on https://validator.w3.org.
You can check the full report here https://validator.w3.org/nu/?doc=https%3A%2F%2Fforkid.gr%2F.Error: CSS: Parse Error. At line 601, column 36 er{height:868px}@media (max-wi
and this
Error: Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.) From line 1422, column 1; to line 1422, column 43 ='all' />↩<style id='woodmart-inline-css-inline-css'>↩.wd-5 Contexts in which element style may be used: Where metadata content is expected. In a noscript element that is a child of a head element. Content model for element body: Flow content.
Attachments:
You must be logged in to view attached files.November 15, 2021 at 1:14 pm #331960
Artem TemosKeymasterHi,
The first one seems to be caused by some custom CSS added on your website https://prnt.sc/1zo75xo
As for the second one, we will release an update with the fix soon.Kind Regards
November 16, 2021 at 7:12 pm #332357
bigdropParticipantThe error with the megamenu was not fixed even after the last update.
I get the same error
Error: Element style not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
When I check the code of the page I get this
<style data-type="vc_shortcodes-custom-css"></style>
Is there a way to fix this?
Should I do some extra steps after updating to version 6.2.3? -
AuthorPosts
The topic ‘fix erors from validator.w3.org’ is closed to new replies.
- You must be logged in to create new topics. Login / Register