Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with the W3C validator : <button> inside <a> tags #49

Open
mkrtchian opened this issue Oct 10, 2020 · 1 comment
Open

Errors with the W3C validator : <button> inside <a> tags #49

mkrtchian opened this issue Oct 10, 2020 · 1 comment
Labels

Comments

@mkrtchian
Copy link
Contributor

When I try the code of a wiki page in the W3C HTML validator, it shows some errors about buttons in <a> tags :

The element button must not appear as a descendant of the a element.

For buttons like here.

We can probably remove the <button> tags to let only the wrapping <a> tags but I guess they add some styling from material CSS, so some changes should be also done about that to keep the current styling. I haven't tried to change this yet.

@LeonStaufer
Copy link
Owner

Yes, this is an issue, mainly of semantic nature though, because it doesn't cause a problem in modern browsers.

I agree, that it would be better to only use <a> tags, but this would require porting a lot of styles from MDL. To be honest, I'm not sure if that's worth it.

A better solution might be using something such as upgradeDom to consistently update all components of the webpage to be inline with the MDL spec.

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

No branches or pull requests

2 participants