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
htmlproofer upgraded major version number #1764
Conversation
@mxsasha looks like we've got approx 2000 errors with this config, mostly plain
|
Here are some potentially valid errors
Which remained after brute forcing all links to I'm out of steam for now anyway |
Finding out if it is possible to leave the http gjtorikian/html-proofer#727 |
Oh, there is a temporary option of using |
Should we care about this in current confs?
OK, that was an unexpected journey. There are at least a couple of band-aids in here that we should revisit:
But for now, this turns link checking back on. :-p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Hope the journey wasn't too demanding.
I had one question, but it's probably not a blocker either way.
<div class="hero-logo" data-proofer-ignore> | ||
<a href="/conf/eu/2016/"> | ||
<img src="../../../../_static/img/2016/site-logo.png" /> | ||
</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the error go away if the image had an alt
attribute? It seems like it's an empty link for people who don't load images, which isn't ideal for accessibility. Though I doubt there's many people going back to look at the logo from 6 years ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I was over enthusiastic in my search replace. The ignore there is intended for the bunch of a
tags that don't have a reference, like this one: https://github.com/writethedocs/www/pull/1764/files#diff-7a114b4493925c9b9c38c932134ded5be5f69f6f371dec742f42271428f9d96cR45
We don't check for empty or missing alt tags, because we have so many, although I'd definitely be interested in fixing that, at least in current conferences. What is best practice for alt tags for images that don't mean anything and are just part of the theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the unnecessary changes, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For those, an empty alt attribute:
<img src="image.png" alt="" />
That signals that it's just decoration and is intentionally blank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so we have the following two options for htmlproofer:
p.option 'ignore_empty_alt', '--ignore-empty-alt', ' If `true`, ignores images with empty/missing alt tags (in other words, `<img alt>` and `<img alt="">` are valid; set this to `false` to flag those)'
p.option 'ignore_missing_alt', '--ignore-missing-alt', 'If `true`, ignores images with missing alt tags'
And we could run htmlproofer multiple times, for example ignoring alts on everything before 2022, and another not ignoring alts but allowing empty on 2022...
The place to start there would be in docs/_templates/2022/*
And changed some stuff around.
This is a first pass to make it work.
I'm not sure what happened to the internal domain.
CC @mxsasha @CollierCZ