Myzwer / foothillschurch

Bootcamp II is a wordpress theme (as well as an inside joke) designed to suit the needs of foothillschurch.com. It makes use of webpack, Babel, Sass, Tailwind, Browsersync, PostCSS, ESLint, Stylelint, Prettier and more. It is meant for that site, but if you can use it by all means go for it.
1 stars 1 forks source link

Invalid HTML: Button inside anchor tag #26

Closed rain2o closed 1 month ago

rain2o commented 1 month ago

https://github.com/Myzwer/foothillschurch/blob/d75494784caf988edbcdb95afebe7becdca009e7/frontpage.php#L137-L138

This is invalid HTML. An <a> tag should be used when a user is directed to a new page. Semantically, a <button> should be used when an effect is caused by the click (like a modal or something). If you want to style an anchor tag like a button that's fine, but it should be all styles doing this.

Side note: this specific link doesn't have a hover effect. For accessibility (and generally better UX) anything clickable should indicate it is by changing its appearance in some way on hover.

rain2o commented 1 month ago

I'm seeing this trend in multiple places. I'm not going to comment on each one, but this applies anywhere this nesting happens.

Myzwer commented 1 month ago

After editing 18 files, this is done.