Skip to content

fix(theme): allow translating local search loading text - #5588

Open
abdul-karim-mia wants to merge 1 commit into
vuejs:mainfrom
abdul-karim-mia:fix/local-search-loading-text
Open

abdul-karim-mia wants to merge 1 commit into
vuejs:mainfrom
abdul-karim-mia:fix/local-search-loading-text

Conversation

@abdul-karim-mia

Copy link
Copy Markdown
Contributor

Description

When local search displays a spinner while loading the index or querying results (showSearchSpinner), the spinner's aria-label was hardcoded to 'Loading search results'. This prevented localized and multi-language documentation sites from translating or customizing this screen-reader announcement.

This PR adds an optional loadingText?: string field to ModalTranslations, wires it into VPLocalSearchBox.vue with fallback to 'Loading search results', and adds unit test coverage for translation resolution across default, global, and locale-specific configurations.

Linked Issues

Addresses #5056

Additional Context

  • All 530 unit tests pass (pnpm run test:unit).
  • Type check passes (pnpm run test:types).
  • Prettier check passes (pnpm format:fail).
  • Pure LF line endings and DCO signed-off.

Add loadingText to ModalTranslations and use it in VPLocalSearchBox.vue for the search loading spinner aria-label, defaulting to 'Loading search results'. This allows localized and custom documentation sites to translate the loading state announcement for screen readers.

Signed-off-by: Abdul karim mia <akmia51@gmail.com>
@netlify

netlify Bot commented Nov 22, 2026

Copy link
Copy Markdown

👷 Deploy request for vitepress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit c08e1bf

This branch has not been deployed

No deployments
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.

1 participant