Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use <mark> instead of <strong> by default to highlight search matches #38

Open
jnachtigall opened this issue Mar 7, 2018 · 0 comments

Comments

@jnachtigall
Copy link

jnachtigall commented Mar 7, 2018

Please see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark

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.

By the way there's also https://github.com/bvaughn/react-highlight-words (which I used in the past) which also uses mark not strong to show search matches.

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

No branches or pull requests

1 participant