Skip to content

Add Form element to the search input#3777

Merged
sveltifier merged 10 commits intomainfrom
add-form-element-to-search-input-in-header
Jan 23, 2026
Merged

Add Form element to the search input#3777
sveltifier merged 10 commits intomainfrom
add-form-element-to-search-input-in-header

Conversation

@SriHV
Copy link
Copy Markdown
Contributor

@SriHV SriHV commented Jan 15, 2026

What is the context of this PR?

ONSDESYS-778

Created a new parameter search to change the structure around search functionality for better readability.
The new structure will be

 "search": {
            "id": "search",
            "navAriaLabel": 'Nav Search',
            "toggleAriaLabel": 'Toggle search',
            "form": {
                "action":  "https://www.ons.gov.uk/search" ,
                "inputName": "q",
                "inputLabel": "Search the ONS",
                "buttonText": "Search",
                "buttonAriaLabel": "Submit search"
             },
            "links": {
                'heading': 'Popular searches',
                "itemsList": [
                    {
                        "url": '#1',
                        "text": 'Cost of living'
                    },
                   ......
                ]
            }
        }

This will replace the existing searchLinks parameter which is now being deprecated and will be removed in the next major version.

As per the ticket:

  • Added form element to the search input as per the ticket
  • Added configurable name to the input and it defaults to q.
  • Added a action param for configurable action and it defaults to ``.

How to review this PR

Check that the new functionality works as expected
Check that all tests pass

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 15, 2026

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit b4d5e89
🔍 Latest deploy log https://app.netlify.com/projects/ons-design-system-preview/deploys/6973477853ea17000873f4b1
😎 Deploy Preview https://deploy-preview-3777--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SriHV SriHV self-assigned this Jan 15, 2026
@SriHV SriHV added the Bug Something isn't working label Jan 15, 2026
@SriHV SriHV marked this pull request as ready for review January 23, 2026 10:04
@SriHV SriHV requested a review from a team as a code owner January 23, 2026 10:04
@sveltifier sveltifier merged commit c380598 into main Jan 23, 2026
20 checks passed
@sveltifier sveltifier deleted the add-form-element-to-search-input-in-header branch January 23, 2026 13:14
@SriHV SriHV added the Enhancement Change of existing feature label Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Enhancement Change of existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants