Skip to content

fix(a11y): add instant search advisory to homepage search field#1845

Open
knowler wants to merge 4 commits intomainfrom
knowler/instant-search-advisory
Open

fix(a11y): add instant search advisory to homepage search field#1845
knowler wants to merge 4 commits intomainfrom
knowler/instant-search-advisory

Conversation

@knowler
Copy link
Member

@knowler knowler commented Mar 2, 2026

A major step towards resolving #1653, builds on @alex-key’s awesome work in #1851.

This adds an advisory to the search field on the main page that fulfills the requirement of WCAG 2.2 Success Criterion 3.2.2 On Input (Level A). I added a “lightning bolt” icon to make it seem more like a feature.

This also include a new shortcut to toggle instant search. I have it set to Ctrl+/. I am open to other suggestions. I found Alt did not work.

There is a slight layout shift at the start if the settings has been disabled… perhaps someone could help me with that.

The homepage search field now with an advisory underneath it prefixed with a lightning bolt icon that reads “Instant search: navigate to results as you type. Turn off in settings or press Ctrl+/.”

@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 3, 2026 9:47am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 3, 2026 9:47am
npmx-lunaria Ignored Ignored Mar 3, 2026 9:47am

Request Review

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/en.json Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@knowler knowler force-pushed the knowler/instant-search-advisory branch from 1c0ab37 to db5aa6f Compare March 2, 2026 23:49
@knowler knowler marked this pull request as ready for review March 2, 2026 23:57
@knowler knowler requested review from alexdln and danielroe March 2, 2026 23:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 824e152 and ed977dc.

📒 Files selected for processing (1)
  • test/nuxt/a11y.spec.ts

📝 Walkthrough

Walkthrough

Adds an instant-search UI and behaviour: exposes settings via useSettings(), adds a Ctrl+/ keyboard handler to toggle settings.instantSearch while preserving existing '/' behaviour, widens and refactors the search form layout, conditionally renders an InstantSearch component and an ARIA advisory on the search input, and adds corresponding i18n keys and schema entries for the new strings.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset, describing the addition of an instant search advisory to satisfy WCAG requirements and the implementation of a keyboard shortcut.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch knowler/instant-search-advisory

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2786639 and db5aa6f.

📒 Files selected for processing (4)
  • app/app.vue
  • app/pages/index.vue
  • i18n/locales/en.json
  • i18n/schema.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/pages/index.vue (1)

110-137: Consider reducing initial layout shift from advisory toggling

If settings.instantSearch hydrates client-side, v-if here can produce a small first-paint shift. Consider reserving space or toggling visibility instead of mounting/unmounting.


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db5aa6f and 76070c1.

📒 Files selected for processing (1)
  • app/pages/index.vue

@serhalp serhalp added this to the Alpha announcement milestone Mar 3, 2026
@alexdln
Copy link
Member

alexdln commented Mar 3, 2026

Hydration mismatch with disabled option, 👀

UPD: #1866

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76070c1 and 824e152.

📒 Files selected for processing (2)
  • app/components/InstantSearch.vue
  • app/pages/index.vue

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.

3 participants