Skip to content

feat: add search for criteria and how to pages using Fuse JS package - #457

Open
silverli wants to merge 7 commits into
mainfrom
feat--add-search
Open

feat: add search for criteria and how to pages using Fuse JS package#457
silverli wants to merge 7 commits into
mainfrom
feat--add-search

Conversation

@silverli

@silverli silverli commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator
  • enables token searching... so you could just search for "Alert", but will also allow you to search for "aria-busy" or "card" or anything that might be in the dev notes!!
  • includes a new hook useSearch to use FuseJS matching: https://www.fusejs.io/token-search.html
  • includes new component called searchBar that is added to all overview pages for web, native, and how to
    --

things to discuss:

  • state doesn't update between pages, is that ok?

--
Claude code was used to help generate code.

Comment thread src/components/content-display/content-display.tsx
Comment thread src/components/custom-components/cards/cards.tsx
@silverli
silverli force-pushed the feat--add-search branch from 4fa615a to 68a27b2 Compare June 5, 2026 20:33
@joe-watkins
joe-watkins self-requested a review August 5, 2026 18:39
@joe-watkins

Copy link
Copy Markdown
Collaborator

@silverli I love this! Feedback in! I think a good enhancement for future work could include:

  1. Some Unit Tests - not seeing any
  2. Including Page Level components in search (I think it's limited to Components right now)

Comment thread src/components/custom-components/search/search.tsx
font: var(--magentaa11y-typeset-body-xl-strong);
}

&__input {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverli I think a custom CSS :focus-visible offset might look better since the focus ring is butting up against he magenta outline-offset: -4px or something.

const resultsString = resultCount === 1 ? 'No results found' : `${resultCount} result${resultCount !== 1 ? 's' : ''} found`;

return (
<div className="searchbar">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverli search landmark role opportunity here. role="search"

</label>
<input
className="searchbar__input"
role="combobox"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverli I'm a tad worried we might see screen reader conflicts with the ARIA Combobox approach here because the ARIA Menu items have nested links which is a no-no - they can only be menuitems and not consist of focusable child controls. I suggest killing all Combobox ARIA and just rely on the live region for dynamic updates. This would include the removal of aria-expanded too.

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.

2 participants