Link delegation to descendant
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 4.5k
- Forks
- 226
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed link attribute, the section and a/area example, and the stated accessibility and ergonomics concerns. Research the relevant web-platform behavior and existing approaches used by sites such as Reddit and Rotten Tomatoes. Done means the issue has a decided, accessibility-conscious platform direction rather than only an open request for discussion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- accessibility, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100