Skip to content

autocomplete 3/4: navbar combobox - #262

Open
icio wants to merge 3 commits into
icio/search-fuzzyfrom
icio/search-autocomplete
Open

icio wants to merge 3 commits into
icio/search-fuzzyfrom
icio/search-autocomplete

Conversation

@icio

@icio icio commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Stack created with GitHub Stacks CLI • Give Feedback 💬

icio added 3 commits October 9, 2026 11:37
Content-negotiate /.search on the Accept header: application/json
returns a compact autocomplete payload (capped at 8 results, with a
limitHit flag and no-store caching) for the JS combobox, while browsers
keep getting the HTML page (capped at 100). JSON requests tolerate an
unresolved user instead of erroring.

Signed-off-by: Paul Scott <408401+icio@users.noreply.github.com>
Add a WAI-ARIA combobox form to the page header (a plain GET /.search
form that works without JS) and reference the not-yet-added search.js
that will enhance it. Move the stylesheet to a base.src.css source
compiled by tailwind (content now scans static/*.js) and regenerate
static/base.css with the new combobox and results-page styles.

Signed-off-by: Paul Scott <408401+icio@users.noreply.github.com>
Add static/search.js, which enhances the header form into a WAI-ARIA
combobox: it debounces keystrokes, fetches /.search as JSON, renders a
listbox popup with fuzzy-match highlighting and a "Full results" footer,
and supports full keyboard navigation (arrows, Home/End, Enter, Escape)
plus modifier clicks for new tab/window and the detail page.

Signed-off-by: Paul Scott <408401+icio@users.noreply.github.com>
@icio
icio force-pushed the icio/search-autocomplete branch from a16fffc to 7bfee69 Compare October 9, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant