Skip to content

640 Add an optional clear button to the search widget - #643

Merged
dfe-lance merged 1 commit into
mainfrom
640-search-widget-clear-button
Oct 19, 2026
Merged

dfe-lance merged 1 commit into
mainfrom
640-search-widget-clear-button

Conversation

@dfe-lance

Copy link
Copy Markdown
Contributor

Fixes #640

The search widget can now show a clear button at the end of its box.

  • A new tick box in the widget editor, "Show a clear button in the search box". It is off by
    default, so existing widgets do not change.
  • The cross appears once something is typed. Pressing it empties the box and puts the visitor back
    in it; with instant search it also closes the suggestions.
  • It is a reset button, so it still empties the box without JavaScript.
  • The browser's own clear cross is hidden when this one is shown, so there are never two.
  • The CMS guide's Search page describes the new setting.

Tested: E2E 364, Unit 7476 and Integration 1099 passed, including new E2E tests for clearing with
and without instant search, without JavaScript, and an axe check with the button showing.

Authors can tick "Show a clear button in the search box". A cross at the end
of the box appears once something is typed, empties the box and puts the
visitor back in it. With instant search it also closes the suggestions. It is a
reset button, so it works without JavaScript. Off for existing widgets.

Refs #640
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review app for PR 643 was deleted

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

E2E tests passed

362 passed, 0 failed, 4 skipped in 19 min 46 s

Commit 896a812 against https://check-performance-data-pr-643.test.teacherservices.cloud (run)

@dfe-lance
dfe-lance merged commit 63b29ca into main Oct 19, 2026
25 checks passed
@dfe-lance
dfe-lance deleted the 640-search-widget-clear-button branch October 19, 2026 14:32

This branch was successfully deployed

1 active deployment
review — 896a8122 Deployed Oct 19, 2026 by dfe-lance via Delete Review App 643 #343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CMS - add clear button to search widget

2 participants