Article teaser in a tag index or page list: a link in the excerpt makes a link inside a link
Maintainers usually reply within 1 day
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
- Domain
- accessibility, frontend
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
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
- 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.
More from PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
PlanBCode/hypha#586 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
parse-community/parse-server#10871 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4270 ·
-
502 on Node 26: ERR_INVALID_ARG_VALUE: Setting the TLS ServerName to an IP address is not permittedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
c1overzz/dsh-bili-scroll#189 ·
Maintainers usually reply within 1 day