Forms: labels of the editor fields and the festival forms point to a field that does not exist
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- html, php
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Read system/core/editor.php at loadEditor() (lines 179–194), then inspect the festival form fields in system/datatypes/festival.php at the listed lines. A linked pull request already contains the fix; the issue reports a browser test using the mailing list editor that fails on main and passes on the branch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Rule. <label for="x"> must refer to the id of a form field. Chrome reports a label whose for matches no id
(FormLabelForMatchesNonExistingIdError) or matches only a name (FormLabelForNameError) in its Issues panel;
clicking the label does nothing and a screen reader does not connect label and field.
In Hypha the for of a label is also how HTMLForm finds the label of a field by name (scanForm(),
system/core/document.php:429), so the value must stay the field name; the field needs that name as its id.
Places (upstream/main d97ab7b):
system/core/editor.php:179-194,loadEditor(): an<editor name="...">becomes<textarea class="wymeditor">
without an id. Affected labels:
system/datatypes/peer_reviewed_article.php:1667, 1679, 1684, 1689(excerpt, text, method, sources) and
system/datatypes/mailinglist.php:1049, 1052(description, email_welcome_text).
(mailinglist.php:1087already gives its editor an id and is not reported.)system/datatypes/festival.php:399, 404, 409, 414(default sign-up form) and
661, 666, 671, 678, 684, 689, 701(default contribution form): inputs with only aname.
Evidence. Issues panel, PHP 8.2 and 8.5, desktop and phone:
FormLabelForNameError / FormLabelForMatchesNonExistingIdError <label for="excerpt">uittreksel</label> (article edit, 4 labels)
FormLabelForNameError / FormLabelForMatchesNonExistingIdError <label for="description"> omschrijving </label> (mailing list edit, 2 labels)
FormLabelForNameError / FormLabelForMatchesNonExistingIdError <label for="name">Naam van organisator / presentator</label> (festival contribute, 7 labels)
The sign-up form cannot be opened on main because of #548, but has the same pattern.
Fix.
- In
loadEditor(), give the textarea its name as id when it has no id and no other element on the page has that id
(checked with XPath, so an existing id such asmainis never duplicated). - In the two default festival forms, add
id="[[field-name-...]]"to each field; the label of the image points to the
file input, which is the field the user operates.
A pull request with the fix follows (commit "forms: Give the fields of the editor and the festival forms the id their label points to"), tested on PHP 8.2 and 8.5 with a browser test that reads the Issues panel (fails on main, passes on
the branch). The article edit view of a new, empty article gives a fatal error on main (#525), so the test uses the
mailing list editor, which goes through the same loadEditor() code.
Related: #264 (simplify form generation).
Found by a crawl of every page type with Chrome, reading the console and the Issues panel, as visitor, member and administrator, on desktop and phone.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- JavaScript
- Star
- 5
- Fork
- 9
- Merge trung bình
- 19 giờ 10 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Impact: Low Level: Easy Type: Bug Value: Coders
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
PlanBCode/hypha#586 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PlanBCode/hypha
Issue tương tự
-
follow-redirects updateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
mailgun/mailgun.js#544 ·
-
beginner bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
BistaDinesh03/critique#266 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
solana-foundation/solana-web3.js#4015 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: dependencies auto-generated cwe: 405 dependencies ecosystem: npm help wanted package: minimatch scope: runtime security security-alert severity: medium source: dependabot supply-chain vulnerability
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
tdk-landscape/tdk-cli-core#2811 ·
-
a11y bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-webui/open-webui#33442 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày