Re: Nested links (not related to children presentational issue in ARIA 1.1)

Thanks all for the feedback.

Some clarifications:

   - The HTML parser does not allow nested links. All browsers when running
   an HTML parser will automatically close the open <a> tag when they
   encounter a new one.

   - However, all browsers tested will render nested HTML links
   consistently if you create the nesting structure with script.  This is the
   demo Cameron McCormack made of that behavior:
   http://mcc.id.au/temp/nested-links.html
   (I'd be interested in feedback from screen reader users testing the
   generated HTML snippet.)

   - When parsing SVG (with XML or HTML parser), close tags are never
   inserted because of disallowed children elements.  So if your markup has
   nested <a> elements, your DOM has nested <a> elements, too.

   - Many browsers & SVG tools currently support nested links.  Other
   browsers (Blink & WebKit) follow a general SVG rule that elements that are
   in invalid places (based on the element content models in the spec) should
   not render; they exclude all the content (shapes and text) that is inside
   the nested link.
   Demo of the SVG case: http://output.jsbin.com/quvuyaxace/1
   (Again, feedback on usability in current AT would be helpful. Firefox
   and Edge render the nested links without any obvious problems for visual
   mouse and keyboard users.)

I don't think the "do not render" approach used by Blink & WebKit is very
robust or helpful to end-users.  We would want to change that part of the
spec one way or another.

~Amelia

Received on Friday, 24 June 2016 03:07:45 UTC