Application forms: the Tags list has no accessible name with scripts off #625
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#625
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, readingpartials/tags_field.htmland rendering the application edit page through the test client.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The script side is now atstatic/js/app.js:1777and:1785(aria-labelledby) and:1837-1838(the native control hidden); the templates have not moved.tags_field.htmlheads the native multiple select with<span class="label" id="labels-tags-heading">Tags</span>. A<span>labels nothing, and the select carries noaria-labelledby. Onlyapp.jspoints its own chip control at that heading id, and it hides the native select while doing so (native.hidden = true). So with scripts off, which is exactly when the native select is what a person uses, the select has no accessible name. The company form's industries, the other user of the same pattern, use a<fieldset>and<legend>and do not have this problem (templates/jobs/company_form.html:44-46).templates/partials/tags_field.html:7-9; included bytemplates/applications/application_form.html:27andtemplates/applications/application_intake.html:63. The script side isstatic/js/app.js:1544and:1552(aria-labelledbyset on the elements it creates) and:1604-1605(the native control hidden).applications:update) renders<span class="label" id="labels-tags-heading">Tags</span>and then<select name="tags" aria-describedby="id_tags_helptext" id="id_tags" multiple>, and nothing on the page saysfor="id_tags". With scripts off, a screen reader reaches a multiple-select list announced only by its help sentence; the visible word "Tags" above it is not associated.select-name.<label for="{{ form.tags.id_for_label }}" class="label" id="labels-{{ form.tags.html_name }}-heading">{{ form.tags.label }}</label>. Onceapp.jshides the select, the label points at a hidden control, which is harmless, and the chips keep their name througharia-labelledby.Done when
tests/test_labels.pyrendersapplications:updateandapplications:createand asserts that thetagsselect has a<label for>pointing at it (or anaria-labelledbynaming an element whose text is the field's label).