Skip to content

Link delegation to descendant #1104

Open
@noamr

Description

@noamr

As per spec, the a element cannot nest, you cannot put links inside links.
This is important from an a11y perspective and for other reasons.
However, many websites today (e.g. Reddit, Rotten Tomatoes) implement this kind of link "nesting" on their own with somewhat verbose javascript.

Proposing to discuss finding a web platform solution for this that would take accessibility and ergonomics into account.
This solution might look like link delegation

<section link="item1-link">
   <link id="item1-link" href="details?item=1">
</section>

In the above example, the link attribute of the section element "delegates" the link to an a (or area) descendant with the given ID. UAs should implement this by making the section's default click action delegate the click to the item1-link element, and they may support it in other UI such as right-clicking the section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions