Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
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.

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>