Forms: labels of the editor fields and the festival forms point to a field that does not exist
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- html, php
- Ambito
- accessibility, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 9
- Merge medio
- 18h 7m
- PR unite (30g)
- 11
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanBCode/hypha
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PlanBCode/hypha#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PlanBCode/hypha#522 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PlanBCode/hypha
Issue simili
-
bug documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
awslabs/visual-asset-management-system#880 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Workspace settings forms stay at 50% width on narrow screens and wrap text word by wordApertapossible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Mintplex-Labs/anything-llm#6889 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-next#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nhsuk/nhsuk-prototype-kit-package#439 ·
I maintainer di solito rispondono entro 1 giorno