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

Russell Leggett russell.leggett at gmail.com
Wed Jul 30 09:54:42 PDT 2008


What about an alternative attribute like "navigate" instead of "href". It
would not carry the full weight of the anchor tag, but would handle the 90%
use case. It would not allow for the same options as the a tag, and the a
tag would continue to work the same way that it has been.

On Wed, Jul 30, 2008 at 10:45 AM, Smylers <Smylers at stripey.com> wrote:

> 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
>
> Noted.
>
> However:
>
> >    <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
> there.
>
> 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.
>
> Smylers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080730/2197f0b8/attachment-0003.htm>


More information about the whatwg mailing list