Use Semantic HTMLements
calebmeyer opened this issue · 0 comments
calebmeyer commented
Summary
In the (brand new) search.js, we're disabling the default behavior of anchor tags so that the page won't try to visit their hrefs. It would be better to use a more semantic element, like a <button>
.
Motivation
This is one of the lints added by the ESlint react (JSX) accessibility package. If you add an onClick handler to an anchor tag, it recommends a button instead: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
Describe alternatives you've considered
This is a minor accessibility win at best, so a valid alternative is to leave the code as is.
Additional context
This was requested by #541, in this comment.