Help Search Block
tibi/help-search renders the Help search input. It can show autocomplete suggestions from tibi-help and tibi-faq, then send users to the Help landing search results.
Summary
| Item | Value |
|---|---|
| Block name | tibi/help-search |
| Editor title | Help Search |
| Category | widgets |
| REST endpoint | GET /wp-json/tibi/v1/help-search |
| Block source | packages/wordpress/plugins/tibi-block-library/src/help-search/ |
| Result template logic | packages/wordpress/themes/tibi/inc/templating.php |
Editor Usage
Use this block on Help surfaces where users should search help articles and FAQs. The default destination is /hjelp/.
| Attribute | Default | Purpose |
|---|---|---|
enableDropdown |
true |
Enables autocomplete suggestions. |
placeholder |
Søk i hjelpesider... |
Input placeholder. |
ariaLabel |
Søk i hjelpesider |
Accessible input label. |
redirectUrl |
/hjelp/ |
Search results destination. |
queryParam |
s |
Query parameter for the search term. |
Autocomplete Flow
The frontend view script reads block config from data-config and fetches:
GET /wp-json/tibi/v1/help-search?q={term}&per_page={number}
The endpoint searches:
tibi-helptibi-faq
Returned items include:
idtitleurltypetype_label
The WordPress query sets use_algolia => true, so Algolia can power matching/order when available.
Help Result Page Behavior
When a Help landing page request includes ?s=, theme code converts the request into a real search query limited to:
tibi-helptibi-faq
It also preserves help-category filters and uses query-string pagination so the Help landing route does not produce broken /page/2/ URLs.
Accessibility Notes
When dropdown is enabled, the input is rendered as a combobox with:
aria-autocomplete="list"aria-expandedaria-controls- A
role="listbox"suggestions list.
The frontend supports keyboard navigation, Enter selection, Escape close, reset button behavior, and outside-click close.
QA Checklist
- Test on stage:
https://beta.tibi.no. - Search for a known
tibi-helppage. - Search for a known
tibi-faqentry. - Confirm the "see all results" row points to the Help landing search URL.
- Confirm empty/unknown searches show the no-results state.
- Test keyboard navigation through suggestions.
- Test
help-categoryfiltering on the result page.
When To Ask A Developer
Ask a developer before changing the endpoint, result item shape, query parameter, Algolia behavior, or Help landing template behavior.