Re: a:hover and a:active and named anchors

Ian Hickson wrote:
> 
> Note that while in HTML, a:hover may give the impression of working, it 
> in fact fails when the language you are using (e.g. XLink) doesn't use 
> <a> as the element for links.

Since I'm primarily talking about lazy or stuck-in-an-old-mindset 
authors, I doubt that this is too much of an issue. How many "legacy" 
documents use XLink? :) When authors find that their existing method 
actually doesn't work, *then* you can advocate a more complicated but 
working solution.

> Unless you are proposing that the element type "a" be a magical shortcut 
> for ":link, :visited"...

Unfortunately I don't *have* a proposal that I consider "good" (see my 
other replies in this thread for lamentations on this issue and why a 
good solution is so hard to produce).

If there were some way for a stylesheet to specify that anything that 
matches "a:not(:link)" should pretend to not match "a" by itself, that 
would be an adequate solution (except that then you're left with the 
question of how to ensure that the expected simple and reasonable ways 
to match it explicitly, such as "a[name]", "a:not([href])" and 
"a:not(:link)", all continue to work). That way the specific problem 
case could be excluded by the UA stylesheet without breaking any 
standards (since the standards deliberately don't define what should go 
in the UA stylesheet).

> Mozilla has the extension pseudo-class :-moz-any-link. Maybe CSS could 
> have such a pseudo-class introduced.

That would be a good thing in any case (IMHO). Unfortunately, despite 
being a very good thing going forward, introducing it at this point 
still leaves both the legacy-document issue *and* the legacy-browser 
issue unsolved. Then you're left with the lesser-of-two-evils advocacy 
question - do you advocate a nice and simple (but not working on any 
browser yet released) solution or one that (as I already said) is too 
complex to have any hope of being successfully advocated? Or the worst 
of both worlds, an even-more-complex combination of the two?

Stuart.

-- 
Stuart Ballard, Programmer
NetReach - Internet Solutions
(215) 283-2300, ext. 126
http://www.netreach.com/

Received on Tuesday, 30 July 2002 15:01:21 UTC