Open gregoriopellegrino opened 1 month ago
This doesn't look like a problem to fix in epubcheck. You've put the role on an img
tag where it isn't valid per the ARIA in HTML specification.
I think you need to take this to the ARIA group to sort out whether it is allowed on images or not and update the ARIA in HTML document accordingly. Validation of roles normally come from the validator.nu code, so that needs updating to fix the issue here, and they don't usually modify their code until the ARIA in HTML document is updated.
Sounds like there are some major confusion using role="math"
Look here
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/math_role
they have an example:
<img src="pythagorean_theorem.gif" alt="a^{2} + b^{2} = c^{2}" role="math" />
Sounds like there are some major confusion using role="math"
The ARIA spec appears to be the source of this markup (see the section on polyfilling the equation). They show an example of transforming math to an image and the markup also shows the role on the img
tag.
If I try it out in a browser and check the accessibility tree, the alt text is correctly associated with the role, so I suspect it's the ARIA in HTML doc that is out-of-date. But fixing it and then the validator is usually what's necessary to get a change into epubcheck.
Okay, so I'll open an issue for ARIA-HTML.
When following the WAI ARIA 1.2 example for using
role="math"
on an image element to indicate that it represents a mathematical expression (https://www.w3.org/TR/wai-aria-1.2/#example-8), EPUBCheck reports an ERROR RSC-005 stating that the value of the "role" attribute is invalid.From the WAI ARIA 1.2 spec:
However, EPUBCheck doesn't recognize
math
as a valid value for therole
attribute, resulting in a false positive error.Here you can find a sample EPUB file exhibiting this issue for testing purposes: quadratic-formula.epub.zip