No img src but data-src-fg on a WordPress site

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
ajtruckle
Rank II - Novice
Rank II - Novice
Posts: 47
Joined: Sat Feb 27, 2010 1:24 pm

No img src but data-src-fg on a WordPress site

Post by ajtruckle » Thu Apr 26, 2018 6:48 am

I am working on my Wordpress website www.publictalksoftware.co.uk and I started to run it through HTML Validator.

A repeated error was consistently raised:

Code: Select all

Error in line 639 at character 304: The "img" element (with class="fg-image") requires the "src" attribute.
So, I looked at one of the places this was raised:

Code: Select all

 <img  title="Ribbon" width="100" height="100" data-src-fg="http://www.publictalksoftware.co.uk/wp-content/uploads/cache/2018/04/pt0/3907932661.png" class="fg-image" />
I see that it has it's own

Code: Select all

data-src-fg
but no

Code: Select all

src
entry. This code is created by the FooGallery plugin. I have not yet asked there about this issue because I don't know much about Wordpress mechanics.

I don't see any setting in the options for the media to specify this:

Image

Logic tells me that it is a setting specified automatically. Anyway, what I am asking is that technically, a src parameter is being specified. It is just not called "src". Is this a issue I need to raise with the plugin developer?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3359
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Using SEO Validation with a WordPress site

Post by Albert Wiersch » Thu Apr 26, 2018 8:59 am

Hello Andrew,

In the next update, CSS HTML Validator will generate this warning:
Even though this "img" (with class="fg-image") element has a "data-src-fg" attribute, it still technically requires an "src" attribute. This message is displayed up to 5 times.

You can disable that warning if you want, but note that technically "img" elements should have an "src" element. Here is more info:
https://stackoverflow.com/questions/415 ... t-just-src

So you may want to bring it up with the plugin developer... but even though it's not technically correct, it probably works "well enough" for the vast majority of people (assuming the plug-in has been thoroughly tested).

I doubt this has any significant effect on SEO but only the search engines would know for sure.
Image
Albert Wiersch

ajtruckle
Rank II - Novice
Rank II - Novice
Posts: 47
Joined: Sat Feb 27, 2010 1:24 pm

Re: Using SEO Validation with a WordPress site

Post by ajtruckle » Thu Apr 26, 2018 9:05 am

Ok, I have raised it here:

https://wordpress.org/support/topic/mis ... ttributes/

I also raised the query about the long lines of code (7000+ characters):

https://wordpress.org/support/topic/seo ... n-warning/

Post Reply