Report: in Greek, Ukrainian and five other languages both tallies get the id tally- and share one name #629
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#629
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, reading the report templates and running Django'sslugifyover the translated headings in every catalogue.Checked again on 2026-10-01 against
mainat0a5cad587: still present.The two tallies on the job-search report build their ids from the translated heading through
slugify, which drops every character outside ASCII. Where both headings are written in another script, both sections get the same empty-suffixed id, and the second region is named by the first one's heading.templates/applications/partials/report_tally.html:9-10(aria-labelledby="tally-{{ heading|slugify }}"andid="tally-{{ heading|slugify }}"), included twice fromtemplates/applications/report.html:188-192with the translated "Where they were found" and "What kind of employer".slugifyis called withoutallow_unicode, soslugify("Πού βρέθηκαν")andslugify("Τι είδους εργοδότης")are both"". Of the 39 catalogues that translate both headings today, seven collide: Bulgarian, Greek, Armenian, Georgian, Macedonian, Serbian and Ukrainian. Each language added in another script will join them. Both<h2>elements getid="tally-"; both sections pointaria-labelledbyat it, which resolves to the first, so a screen reader lists two regions called "Where they were found" and announces the employer tally under the sources heading.report.html(key="sources",key="industries") and build both attributes from it,id="tally-{{ key }}". Never derive an id from translated text; a template lint that rejects|slugifyinside anid=attribute would keep it that way.Done when
tests/test_assistive_names.pyincludesreport_tally.htmltwice with two headings written in Greek and asserts the twoidvalues differ and each section'saria-labelledbynames its own heading.