-
Notifications
You must be signed in to change notification settings - Fork 408
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
Incorrect warnings for svg in epubcheck 4.0.1 #680
Comments
After further, examination, one report of this issue seems to be caused by an xhtml anchor "a" tag with href attributes that link directly to an svg image tag deep inside of an svg section of code and not to the xhtml div tag that wrapped the svg tag. I assume this meets the conditions of the xhtml anchor being viewed as an svg anchor to epubcheck (since it linked to the image element inside of the svg tag). The warning is just very confusing in this case as the xhtml anchor really does not need and xlink:title. Having never seen an xhtnl link to an id set deep inside of and svg element on an svg image tag, I am not sure how this should be viewed or checked. Not even sure there is a bug, now. |
Thanks for the detailed bug report 👍. I'll have a look when prepping the next release. |
Unless I am all wet here (and I could be since this is jst by glancing at the code) it appears that in src/main/java/com/adobe/epubcheck/ops/OPSHandler30.java |
Bug example : HTML structure :
=> epubcheck 4.0.1 reports 3 warnings
=> No warning. |
I'm also facing the same issue. can we ignore the warning for time being. |
Same issue here. xhtml links, outside of and linking to external sites result in the warning. |
Fixed with #750 |
Now that Sigil has added support for epub3, I have started to receive bugs related to user's epub3 ebooks not passing epubcheck and asking questions about what the "warnings" are for.
According to a Sigil bug report, the following warning - ACC_011 is reported by epubcheck 4.0.1 (via Pagina) for this snippet of code.
"SVG hyperlinks should have a human-readable title (using the 'title' child element or the 'xlink:title' attribute)"
After searching the epubcheck code for ACC_011 I see it when handling svg "anchor" tags not svg image tags. So I am not sure how this warning is being generated. And according to:
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image the list of attributes allowed does not even include an "xlink:title" attribute on that tag to match the xlink:href attribute. Also according to one of the bug reports, adding xlink:title="blah" to the svg image tag does not prevent epubcheck from generating that warning. In fact, one of the bug reports states:
It almost appears that epubcheck does not recognize the xlink:title tag when it is placed in the svg image or svg main tag. The svg snippet above is typically how epub ebooks add cover images so it is found in many many places. epub2 epubcheck does not indicate any problem with it, only epub3. In fact in one book a user found over 200 of these warnings.
So is this a bug in epubcheck 4.0.1? Should there be a "warning" generated for svg image tags? If so, why doesn't adding an xlink:title attribute to the svg image tag prevent the warning? How should the author address this warning?
The text was updated successfully, but these errors were encountered: