Otherwise, indicates a portion of the document's content which is likely to be relevant to the user's current activity. This might be used, for example, to indicate the words that matched a search operation.
Using <strong class="hightlight"> is not totally incorrect afaik, but it should rather be <mark> to make it semantically 100% correct and better accessibly to screen readers and the like.
Please see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark
Using
<strong class="hightlight">
is not totally incorrect afaik, but it should rather be<mark>
to make it semantically 100% correct and better accessibly to screen readers and the like.By the way there's also https://github.com/bvaughn/react-highlight-words (which I used in the past) which also uses
mark
notstrong
to show search matches.