This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22473 - False detected error with "src" attribute
Summary: False detected error with "src" attribute
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-26 10:55 UTC by automatik68
Modified: 2013-07-01 01:25 UTC (History)
1 user (show)

See Also:


Attachments

Description automatik68 2013-06-26 10:55:08 UTC
Hi,

When I have a webpage with the "src" attribute, it's detected as an error (and seems to recognize "src" like "srcset" attribute), althoug it shouldn't.

See the following "error":

Error: Attribute srcset not allowed on element img at this point.

From line 1658, column 91; to line 1658, column 482

<img alt="Pour" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/17p…dia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/34px-Symbol_support_vote.svg.png 2x" />

src had correctly wrote but an error is anyway detected for it (and "src" is indicated as a valid attribute).

The report of the bug can be found here : http://validator.w3.org/nu/?doc=https%3A%2F%2Ffr.wiktionary.org%2Fwiki%2FWiktionnaire%3AWikid%25C3%25A9mie%2Fmai_2013

I use Mozilla Firefox 21.0

So please be concerning with this.

Thanks by advance
Comment 1 Michael[tm] Smith 2013-06-26 11:46:12 UTC
(In reply to comment #0)
> When I have a webpage with the "src" attribute, it's detected as an error
> (and seems to recognize "src" like "srcset" attribute), althoug it shouldn't.
> The report of the bug can be found here :
> http://validator.w3.org/nu/?doc=https%3A%2F%2Ffr.wiktionary.
> org%2Fwiki%2FWiktionnaire%3AWikid%25C3%25A9mie%2Fmai_2013

Actually, for that page, the validator is correctly reporting an error for the "srcset" attribute, not the "src" attribute. Please look at the actual HTML source of that page.

> Error: Attribute srcset not allowed on element img at this point.
> 
> From line 1658, column 91; to line 1658, column 482
> 
> <img alt="Pour"
> src="//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.
> svg/17p…dia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/34px-
> Symbol_support_vote.svg.png 2x" />

Please look at the actual HTML source of the page. It has this:

<img alt="Pour" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/17px-Symbol_support_vote.svg.png" width="17" height="17" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/26px-Symbol_support_vote.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/94/Symbol_support_vote.svg/34px-Symbol_support_vote.svg.png 2x" />
Comment 2 automatik68 2013-06-30 00:42:51 UTC
Thanks for your answer.

Actually, there's the 'srcset' attribute in the page. But it doesn't matched correctly, isn't it?
Comment 3 Michael[tm] Smith 2013-06-30 02:59:42 UTC
(In reply to comment #2)
> Thanks for your answer.
> 
> Actually, there's the 'srcset' attribute in the page. But it doesn't matched
> correctly, isn't it?

The validator is matching it correctly as far as I can see
Comment 4 automatik68 2013-06-30 16:53:24 UTC
But on the screenshot it does not appear. (You can see it on your message above.) Actually though, this is not a major problem.
Comment 5 Michael[tm] Smith 2013-07-01 01:25:35 UTC
(In reply to comment #4)
> But on the screenshot it does not appear. (You can see it on your message
> above.) Actually though, this is not a major problem.

Yeah, in the case where the snippet of source for the element that contains the error is more than a certain number of characters, the validator UI elides some part of the snippet. To see the full source, you need to use the "Show source" option and follow the links with the link and column numbers to look at the exact original source where the error occurred.