Article teaser in a tag index or page list: a link in the excerpt makes a link inside a link

Open
#695 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@guidol-ive is already working on this.

Since Oct 29, 2026.

  • #699 by @guidol-ive — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript

Research direction

Start with peer_reviewed_article::renderExcerpt() and compare it with renderExcerptBody(); the issue says the former is called inside links from tagindex::renderPage() and PagelistMacro::renderPage(). Check how excerpt links are represented and how the article page preview uses the body. Done means list excerpts no longer contain nested links while links remain in the article page preview; linked PR #699 is already open.

Written by the indexing model from the issue text.

Description

Component: User interface Impact: Medium Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors

A tag index and a page list show every article as a link around its teaser: title, author, date, featured image and excerpt. When the excerpt itself holds a link, the page has a link inside a link:

<li class="tagindex-item"><a href="nl/Article">
  <h2 class="title">…</h2>
  <div class="excerpt"><div class="excerpt_body"><p>Part of <a href="https://example.org/">https://example.org/</a>.</p></div></div>
</a></li>

A link inside a link is invalid HTML. The browser's parser closes the outer link at the inner one and reopens it, so the DOM ends up with an empty link and a teaser that is cut in two. Screen readers announce a link without a name; axe reports link-name (WCAG 2.4.4, 4.1.2), and so does Lighthouse.

On a test copy of a site with about 1,200 public pages, axe found it on about 2,250 pages, most of them through the lists in the sidebar.

tagindex::renderPage() and PagelistMacro::renderPage() both put renderExcerpt() in an <a>; peer_reviewed_article::renderExcerptBody() copies the excerpt as it is.

Fix: peer_reviewed_article::renderExcerpt(), which is only called inside such a link, replaces each link of the excerpt with its content. The article page itself (the preview of renderExcerptBody()) keeps the links.

🤖 Generated with Claude Code

Dominant language
JavaScript
Stars
5
Forks
9
Avg merge
18h 49m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PlanBCode/hypha

All issues in PlanBCode/hypha

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.