Forms: suggestions and auto-completion in most fields the person fills #1251
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#1251
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?
The need
A way to ask less of the person (the aim of #1250): suggest or complete what they are about to type in most fields, so a form is filled by choosing rather than typing, and what is typed stays consistent (one spelling of a city, a company, a job title, a skill). The person can always type something else; a suggestion is never imposed.
What exists today
Some fields already suggest: skills from ESCO (
jobs/esco.py), industries from NACE (jobs/industries.py), a few<datalist>or combobox uses (the phone widget, the industry list, address place, share and move-owner pickers), and the Annuaire / Wikidata lookups for companies. There is no common mechanism, so each one works its own way and most fields (a job title, a city, a company name, a contact's role, a source, tags) suggest nothing.Wanted
aria-activedescendant, announced result count), works without script as a plain field, and never blocks submit.First fields to cover (by how often they are filled)
Application: company, job title, source, location, contract type. Company: name, city, country, industry, website. Contact: name, role. CV and career: employer, title, school, skills, languages. Documents: template and tags.
Performance and limits
Debounced (about 250 ms), at most ten results, a short cache per field, an index on the columns searched; no suggestion request on page load; results for a field are a plain HTML fragment (htmx), consistent with the rest of the interface.
Tests
The component's keyboard and screen-reader behaviour (axe, announced counts), no-script fallback, right-to-left; the suggestion sources return only the person's data; a dependent fill does not overwrite typed text; the lookups stay off unless enabled; the request volume per keystroke is bounded.
Strings go through Weblate only. Related: #1250 (the study this serves), #1249, #1245, #879, #1248.