Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Ability to map misspellings to other words

Avatar

Level 2

As a site visitor, I want to be shown a "did you mean" word when I have misspelled a word within search.


GIVEN I have entered a popular misspelled word (for example: caronavirus)

  1. WHEN the search results were returned THEN I might see text like "Did you mean coronavirus?" and when clicked able to show results for the correct search term

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

I think you need to handle this via custom javascript, where you can add some mapping of the misspelled words with the correct works and if search term matches with the list of misspelled words you can show the correct word. 

 

The list can be updated eventually on new terms which you figure out by user search terms.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

I think you need to handle this via custom javascript, where you can add some mapping of the misspelled words with the correct works and if search term matches with the list of misspelled words you can show the correct word. 

 

The list can be updated eventually on new terms which you figure out by user search terms.

Avatar

Community Advisor

As per the W3 spec, you can use the spellcheck attribute on HTML input fields (such as <input> and <textarea>) to toggle browser's built-in spell checker on or off. It has the following values:

  • spellcheck="true" or spellcheck — enables spell checker;
<input type="text" spellcheck="true" />
<textarea spellcheck="true"></textarea>