-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
HTML5 allows omitting anchor href, html-proofer does not. #254
Comments
I have implemented a fix for this: https://github.com/gjtorikian/html-proofer/compare/ignore-href-for-html5 I'm trying to think about how to best roll this out. I'm sure there are HTML5 users who want to be notified if an anchor is missing an href. I guess this will need to be a new option, but I'm not sure if it should default to following the spec or reporting the missing attribute. |
+1, thanks! Behavior is a tricky thing indeed. To me it looks like you're stuck between strictness (stricly adhering to the HTML spec) and backwards compatibility (existing users expect the proofer to find these things). Configuration hell ahead, a new HTML validation rule could be a way to do it. You seem to have plans to change the |
Yeah, my main thinking is to add a new |
Hi,
it would be good if html-proofer would allow omitting the href attribute on tags when doctype is HTML 5.
The spec ( http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element ) explicitly allows it:
When implementing javascript driven links this behavior currently forces to use either href="#" (which spams the history and jumps to the top of the page) or href="javascript:;", which is an ugly workaround) and ignore these via href_ignore.
The text was updated successfully, but these errors were encountered: