Article comments: the reply form and buttons are children of the <ul> of comments

未关闭
#696 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@guidol-ive 已经在做这个了。

开始于 2026年10月29日。

  • #700 来自 @guidol-ive —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
html, javascript, php

调研方向

Start with peer_reviewed_article::buildDiscussionsHtml() and trace how it builds the discussion wrapper, comment list, reply form, and action button. Move the form and buttons to the wrapper after the list, then check rendered public comments and review discussions to confirm the <ul> contains only <li> elements; linked pull request #700 is already open.

由索引模型根据 Issue 内容生成。

描述

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

The comments under an article are a <ul> with one <li> per comment. The form to reply, the button to send it, and in a review the button to close the discussion, are appended to that same <ul>:

<div class="public-comment-wrapper collapsed"><ul>
  <li class="first-comment">…</li>
  <form …>…</form>
  <a class="button" …>Reageer</a>
</ul></div>

A <ul> may only hold <li> (and script-supporting elements). Screen readers announce the list with a wrong number of items, and axe reports list (WCAG 1.3.1).

On a test copy of a site, axe found it on every page with public comments, about 950 pages.

peer_reviewed_article::buildDiscussionsHtml() (the part that renders each discussion) calls $commentList->createChild('p'), $replyForm->appendTo($commentList) and $commentList->appendChild($this->makeDiscussionActionButton(…)).

Fix: append these to the wrapper <div> of the discussion, after the list. No script depends on the form being inside the list; the stylesheet of the default theme only styles ul and li inside the wrapper.

🤖 Generated with Claude Code

主要语言
JavaScript
星标
5
派生
9
平均合并
18 小时 49 分钟
30 天内合并 PR
13

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PlanBCode/hypha 的其他 Issue

查看 PlanBCode/hypha 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。