[RC5, pre-RC6] link-visited-selector-001 questionable under 2 RFCs





Under RFC 1808 [1] and RFC 2396 [2], there is no clear and explicit rule
governing how to parse and proceed with an empty fragment identifier

There may be a de facto standard among mainstream browsers on bringing
document view to the top when dealing with href="#" ... but that's it.

This matter has been discussed before in web authoring newsgroups
(alt.html in 2004).

The closest I could find was:
   an empty URI reference within a
   document is interpreted as a reference to the start of that document,
and a reference containing only a fragment identifier is a reference
to the identified fragment of that document.
Section 4.2. Same-document References of rfc2396.txt

Some browsers may be designed, backend-coded to not reload the already
loaded document too if the URI is empty or if fragment identifier is

Some say href="#" should be invalid according to specs:

RFC1808, in section 2.2 defines in modified BNF form
 "fragment = 1*pchar"
and mentions that the 1* means "[one] or more repetitions of the

So, zero repetitions is not allowed and href="#" is therefore an error.

Since it is an error then the browser, as per the spec, is at liberty to
interperet it as the browser sees fit. There is no "correct" behaviour.
Credits to Richard F. on this.

All this to say that when Konqueror 4.6 loads
and then I click the "Filler text" link, the color remains green (and
does not change to expected orange color) and I believe (am entitled to
think) that the testcase code is not irreproachable precisely because of
this code recourse to href="#"; for sure, Konqueror 4.6 supports
:visited selector.

Any other testcase with a reasonable, normal href value would suffice here.

Gérard Talbot

(section 2.4.1. Parsing the Fragment Identifier)

(section G.4. Modifications from RFC 1808 and section 4.2. Same-document
Contributions to the CSS 2.1 test suite:

CSS 2.1 test suite (RC5; January 11th 2011):

CSS 2.1 test suite contributors:

Received on Monday, 21 February 2011 20:35:42 UTC