Hi.
.eslintrc set to [ "jsx-a11y/anchor-is-valid": 0 ] in react project.
but... chrome show warning..
The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md jsx-a11y/anchor-is-valid
I want disabled. What should I do?
same issue #553
It's a great rule, but see #553.
While I definitely respect your point of view and I believe accessibility is important, the real problem is that CRA implements this and makes it terribly difficult to get rid of it even for prototyping purposes, so for many people seeing some code underlined is no issue, personally it affects my concentration, and after being for more than half an hour trying to turn off the rule and not being able to do so it becomes annoying for saying the least. It's like someone trying to force you to do things his/her way and that is definitely not appealing to me (and I bet to many more). Bootstrap for example, uses links as button, and yes, I am talking about the 4.3 bootstrap that touts to be very accessible and yet it still for some purposes forces you to use link to achieve certain styles (paginators for example), so yes, for the final version of an app this rule is important and has its merit, but if you are trying to prototype a component, honestly I find it unnecessary and bothersome. Just my opinion, I respect yours. Thanks for pointing issue #553
Then it sounds like the real problem is that CRA doesn't allow for easy customization without ejecting. In my experience, I always immediately eject when using CRA precisely for the reasons you describe.
Most helpful comment
While I definitely respect your point of view and I believe accessibility is important, the real problem is that CRA implements this and makes it terribly difficult to get rid of it even for prototyping purposes, so for many people seeing some code underlined is no issue, personally it affects my concentration, and after being for more than half an hour trying to turn off the rule and not being able to do so it becomes annoying for saying the least. It's like someone trying to force you to do things his/her way and that is definitely not appealing to me (and I bet to many more). Bootstrap for example, uses links as button, and yes, I am talking about the 4.3 bootstrap that touts to be very accessible and yet it still for some purposes forces you to use link to achieve certain styles (paginators for example), so yes, for the final version of an app this rule is important and has its merit, but if you are trying to prototype a component, honestly I find it unnecessary and bothersome. Just my opinion, I respect yours. Thanks for pointing issue #553