Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Use Semantic HTMLements #550

Open
calebmeyer opened this issue Jul 17, 2019 · 0 comments
Open

Use Semantic HTMLements #550

calebmeyer opened this issue Jul 17, 2019 · 0 comments

Comments

@calebmeyer
Copy link
Contributor

calebmeyer commented Jul 17, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant