[whatwg] Proposal for a link attribute to replace <a href>
jg307 at cam.ac.uk
Wed Jul 30 06:29:47 PDT 2008
Simon Pieters wrote:
> On Wed, 30 Jul 2008 13:50:18 +0200, Ian Hickson <ian at hixie.ch> wrote:
>> Every now and then, the issue of a global href="" attribute for all
>> elements comes up. There are many valid use cases for this, like being
>> able to make all cells in a table row act like a link, or making a banner
>> ad act like a single block of a link.
>> Unfortunately, I've been told over and over by implementers that a global
>> href="" is a bad idea, and at the end of the day, the implementors are
>> ones who have the final say, so that's just a non-starter.
>> There are also alternative suggestions, like making <a> contain any
>> element. Unfortunately, none of these end up working (e.g. for this
>> proposal, <a><p></a> would create an unexpected DOM -- we'd have to make
>> </p> end tags not optional when the next end tag was an </a>, which would
>> be somewhat confusing).
> The rules for optional end tags are already pretty confusing. I don't
> think it's a problem to require </p> when the "p" element is the last
> child of an "a" element.
I think <table><a><tr> also causes problems; being able to link whole table rows
seems like one of the major use cases for this proposal.
Would the implementor feedback that global href is a bad idea still apply if
instead of "global" it was "large set of elements" where the large set would
explicitly not include things like form elements?
"Eternity's a terrible thought. I mean, where's it all going to end?"
-- Tom Stoppard, Rosencrantz and Guildenstern are Dead
More information about the whatwg