grav-plugin-form icon indicating copy to clipboard operation
grav-plugin-form copied to clipboard

Button with URL doesn't pass HTML validation

Open SeriousKen opened this issue 3 years ago • 2 comments

When a button on a form has a URL it is wrapped in an anchor tag, this does not pass validation at validator.w3.org with the error "The element button must not appear as a descendant of the a element."

SeriousKen avatar Jan 24 '21 16:01 SeriousKen

What is the correct version?

NicoHood avatar Jan 26 '21 07:01 NicoHood

@NicoHood it should be a link, if you want it to look like a button then it should be styled as a button. a tags should not wrap button tags and vice versa. It doesn't validate and it isn't semantically correct either.

SeriousKen avatar Jan 26 '21 08:01 SeriousKen