-
-
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
Need relaxing option for empty alt check #39
Comments
Interesting! I'll have to muse on this. Have you done this yourself? Do people usually use just I ask because it might be very hard to determine between an empty |
It is usually in the form of <img src="my-unrelated-stock-photo.png" alt="" /> I was thinking of a format like this: HTML::Proofer.new("out/", { :alt_ignore => [ "my-unrelated-stock-photo.png", "my-logo.png" ] }) Then the space or no space value in the alt tag wouldn't be an issue, it would just short-circuit the lint. |
Ah, okay, cool. I was thinking of passing in an option but matching |
actually, it should be |
Alt tags may be left empty for decorative images http://dev.w3.org/html5/alt-techniques/#secm3
It would be good if to have a similar whitelist as the href check to exclude known valid images like "logo.png" where the content is purely decorative. In the decorative case, an empty alt tag prevents screen readers from reading the file name as a fallback.
The text was updated successfully, but these errors were encountered: