Re: [XHTML2] Poor little old <a>

"Ernest Cline" <ernestcline@mindspring.com> wrote:

> I have an idea that might just revive a reason for <a>, nested <a>'s.
> Right now, Mozilla implements nested <a>'s in XHTML1 so that only the 
> outer <a> really matters.

Well, not really.  Mozilla's behavior is funny, if you follow the link
through context menu (e.g. Open Link in New Window/Tab), then innermost
link prevails.  See Bugzilla Bug 110817 "Nested XLinks don't work
consistently" [1].  That bug was reported primarily for XLink, in
anticipation of adopting nested links in XHTML2, but the same issue
applies to (X)HTML's 'a' element.  I just didn't bother to report it
as a "bug" as the spec prohibited it and the behavior was undefined.
Just for your information, in most other user agents innermost link
prevails in that case.

Current WG position is that unlike previous versions of (X)HTML,
we do allow nested links in XHTML2, treated like nested XLinks
in SVG.  As far as I know, various SVG implementations have no
problem to handle nested XLinks.

> However, what if nested <a>'s were treated in a manner similar to 
> <object>  That is, suppose we have the following XHTML fragment:
> 
> <a href="doc.pdf"><a href="doc.txt>The Document</a></a>

Another proposal is to use nested 'a' for one-to-many linking.
You might want to have a look at Bob DuCharme's excellent
demonstration [2] and his related article [3].  Yet another
proposal is to allow a list of URIs for 'href' rather than
a single URI.

> In any case, the effect of nested elements with 
> href attributes is something that does need to be addressed in the 
> XHTML2 standard.

Indeed.  That was one of the topics at a meeting with the WAI User
Agent Accessibility Guidelines Working Group, and something we need
to address from accessibility point of view as well [4].

[1] http://bugzilla.mozilla.org/show_bug.cgi?id=110817
[2] http://www.snee.com/xml/linking/1toMdemo.xml
[3] http://www.xml.com/pub/a/2003/03/05/tr.html
[4] http://www.w3.org/WAI/UA/2003/02/xhtml2-comments.html

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Thursday, 10 April 2003 04:28:08 UTC