-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
xhtml validation error - alt attribute missing from html image tag of svg format #2763
Comments
mixmastamyk
changed the title
xhtml validation error - alt attribute missing from svg image tags
xhtml validation error - alt attribute missing from html image tag of svg format
Jul 8, 2016
In short it goes from this:
to this:
In order to validate properly, and be consistent with other formats, such as .png images. |
mixmastamyk
added a commit
to mixmastamyk/sphinx
that referenced
this issue
Jul 9, 2016
Add uri as default alt attribute to images in svg format
mixmastamyk
added a commit
to mixmastamyk/sphinx
that referenced
this issue
Jul 9, 2016
Looks good. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With html output of images or figures (only in .svg format), the attribute
alt
of theimg
tag is missing, which is required under xhtml; causing validation errors. The same did not happen under the parent docutils html writer, from which it is derived from. The problem class isHTMLTranslator
:Docutils, (and Sphinx with other img formats) adds the
alt
attribute with a default value of the source path, which looks like a decent fallback. I've copied that behavior in my fix.The text was updated successfully, but these errors were encountered: