Skip to content
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

svg role="img" causes EPUB2 validation error #146

Open
asylumcs opened this issue Dec 3, 2022 · 1 comment
Open

svg role="img" causes EPUB2 validation error #146

asylumcs opened this issue Dec 3, 2022 · 1 comment

Comments

@asylumcs
Copy link
Contributor

asylumcs commented Dec 3, 2022

Both attached files have HTML+SVG images of the same 3 formulas. Epubmaker generates and EPB2 and EPUB3 for both. Both EPUB3s validate. Only the first one validates as EPUB2. The second zip has role="img" as an SVG attribute.
I would like set role="img" on the outer [<svg>] element and give it a label. This should cause screen readers to just consider it as a single entity and describe it using the label, rather than trying to read out all the child nodes.
test02-ebm1.zip
test02-ebm2.zip

@eshellman
Copy link
Collaborator

this issue is discussed here: w3c/epubcheck#769 It's an unfortunate choice they made.
in our implementation for inline svg, I am removing the role attribute from the svg element for epub2. this allows the role attribute to be used for epub3; there's no way to avoid the epub2 validation error if the svg file is external.

eshellman added a commit that referenced this issue Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants