W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2008

[whatwg] Proposal for a link attribute to replace <a href>

From: Smylers <Smylers@stripey.com>
Date: Wed, 30 Jul 2008 15:45:20 +0100
Message-ID: <20080730144520.GC13677@stripey.com>
Ian Hickson writes:

> ... global href="" attribute for all elements ... Unfortunately, I've
> been told over and over by implementers that a global href="" is a bad
> idea



>    <div class="ad"
>         onclick="this.getElementsByTagName('a')[0].click()">
>    <article class="teaser" 
>             onclick="location = this.getElementsByTagName('a')[0]">
> On Thu, 29 May 2008, Frank Hellenkamp wrote:
> > In the best case the whole rectangle of the teaser is clickable. At the 
> > moment you need some javascript or an a-tag with "display: block" for 
> > it, to get this behavior (see example in my last mail).
> I don't think the JS is a big deal.

Compared to <a href="...">, using onlick events generally provides a
worse user experience, such as the status bar not being updated to
indicate a link's destination in advance of committing to navigate

It may be, given implementers' requirements, that JavaScript solutions
like the above are the best we can do.  But let's not pretend they are
as good as links that don't involve scripting.

Received on Wednesday, 30 July 2008 07:45:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC