[whatwg] [WA1] The a element could be empty

Jim Ley jim.ley at gmail.com
Fri Sep 2 16:27:12 PDT 2005


On 9/2/05, Matthew Raymond <mattraymond at earthlink.net> wrote:
> 1) Why wouldn't you want the content in the element to be inserted by
> Javascript when the page loads when you can just include the content in
> markup and hide it using CSS?

Not particularly wanting to support the OP's issue - I don't see a
problem with the change to the content model of a to require content,
it's a good thing.  However styling a link to print away is not a good
idea, as it means those without css get a link which does nothing, of
course it's still possible with the method in the OP's post that the
user gets a nothing link, but that doesn't mean the link existing in
the source is a good idea.

> 3) How does your original example even prevent the content from being
> viewed when printing?

I don't think that's the purpose, I think the purpose is to ensure
there's not content in the page which is purely behavioural and does
nothing when script is not available.

> 4) What prevents you from inserting the entire <a> element into a <span>?

That is of course a very, very good question.

>   The bottom line is that you need a much better use case.

Absolutely!

Jim.



More information about the whatwg mailing list