flight-manual.atom.io icon indicating copy to clipboard operation
flight-manual.atom.io copied to clipboard

Use Semantic HTMLements

Open calebmeyer opened this issue 6 years ago • 0 comments

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.

calebmeyer avatar Jul 17 '19 21:07 calebmeyer