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 14732 - some quotes are not shown when showing part of code containing errors
Summary: some quotes are not shown when showing part of code containing errors
Status: REOPENED
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 major
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 17:47 UTC by matteo
Modified: 2013-04-20 19:12 UTC (History)
1 user (show)

See Also:


Attachments
html code that reproduces the bug (20.38 KB, text/plain)
2011-11-26 19:40 UTC, matteo
Details
Smaller reproducer (635 bytes, text/html)
2011-11-26 21:15 UTC, Ville Skyttä
Details

Description matteo 2011-11-08 17:47:19 UTC
I am validating a page that contains:

<label for="username">Usuario</label>

This is correctly triggering a validation error because I have no form element with that name.

However, when the error message is shown, it reads:

 Line 41, Column 24: The for attribute of the label element must refer to a form control.
		<label for="username>Usuario</label>

NOTE the absence of the closing quotes. This is very confusing because one at first thinks that the missing quotes ARE the error.


However, if I copy and paste the error message, I find out that the quotes are actually there!!! So it must be some issue in the stylesheet (probably related to highlighting in red the character just next to them) that somehow makes the " character invisible.


Note that I've marked this bug as "critical" (I may even say this is a blocker). The very purpose of validation is spotting errors. If the mere displaying of an error introduces extra errors that are not in the code being validated, you cannot trust what you're reading, you end up having to discriminate real errors by yourself and hence the whole validator becomes useless.
Comment 1 Ville Skyttä 2011-11-08 18:02:05 UTC
(In reply to comment #0)
> I am validating a page that contains:
[...]

Please post the URL of the page so we can try to reproduce the problem.

> Note that I've marked this bug as "critical"

http://www.w3.org/Bugs/Public/page.cgi?id=fields.html#importance
Comment 2 matteo 2011-11-08 21:51:37 UTC
> > Note that I've marked this bug as "critical"
> 
> http://www.w3.org/Bugs/Public/page.cgi?id=fields.html#importance

Oh sorry then it's major, but I see you prefer normal.


> Please post the URL of the page so we can try to reproduce the problem.

I can't because in the meantime I've already changed the content and it doesn't trigger the error any more.

I cannot reproduce it now with minimum code, so it must be some complicated interaction. I will try to find the old code that was triggering the issue and will post it. I thought it could be reproduced with just a <label for="something"> 

What I do can say is that it happens with html5.
Comment 3 Ville Skyttä 2011-11-09 15:53:44 UTC
(In reply to comment #2)
> I can't because in the meantime I've already changed the content and it doesn't
> trigger the error any more. I cannot reproduce it now with minimum code [...]

That's why it's vitally important to post either a URL or a complete document when reporting a bug, there are often a lot of variables in the mix.  I'm marking the bug as resolved/needsinfo - feel free to reopen if you find a reproducer.

> What I do can say is that it happens with html5.

Be sure to read the HTML5 related bug reporting instructions at end of http://validator.w3.org/feedback.html#bugreport
Comment 4 matteo 2011-11-26 18:20:36 UTC
Here is the reproducer:

Copy and paste the attached code to "Validate by direct input".

The last error is shown in Google Chrome as: 
Line 77, Column 22: The for attribute of the label element must refer to a form control.
	<label for="comment>A
Comment 5 Ville Skyttä 2011-11-26 19:25:34 UTC
(In reply to comment #4)

> The last error is shown in Google Chrome as: 
> Line 77, Column 22: The for attribute of the label element must refer to a form
> control.
>     <label for="comment>A
Comment 6 matteo 2011-11-26 19:35:08 UTC
NOW I can't reproduce it any more either. But I assure you I tested it three times and the closing quotes were not shown, and I copied and pasted the html code from the very textarea to be sure I was pasting here the very same code I had pasted there  (and I even pasted it again there and double checked).


So I guess the bug is intermittent or depends on more apparently random factors...
Comment 7 matteo 2011-11-26 19:37:04 UTC
Oh well, actually there is one big difference in copying and pasting it from this very page: that the code here has been reformatted with a lot of extra line breaks.

I'll try to post the reproducing code as attachment
Comment 8 matteo 2011-11-26 19:40:28 UTC
Created attachment 1047 [details]
html code that reproduces the bug

Copy this and paste it into "validate by direct input".

You should now see the issue in even more than one error.
Comment 9 Ville Skyttä 2011-11-26 21:15:04 UTC
Created attachment 1048 [details]
Smaller reproducer

Yes, I can see the problem now -- I suppose it's a Chrome bug (it seems to get confused by the tab character), but leaving open here in case some CSS guru can point out that it isn't.  See the attached smaller reproducer doc and the comments in it.