Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Forms: labels of the editor fields and the festival forms point to a field that does not exist

Đang mở
#620 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@guidol-ive đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #624 của @guidol-ive — đang mở

Đá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ả

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

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:1087 already 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 a name.

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 as main is 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PlanBCode/hypha

Tất cả issue của PlanBCode/hypha

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.