Open laudrain opened 4 years ago
Ace should verify that the img tag for that specific image has the role "doc-cover" and report a violation if not.
We can add that to the feature request backlog.
It would definitely be in the "best practice" bucket however, as it's not really an accessibility violation if doc-cover
isn't present.
While validating the EPUB file using the latest ACE version, we are getting an error when there is no alt text for cover image. Not sure if having an alt text for cover image is mandatory. Also the error message displayed for this issue is pointing to 'missing role="doc-cover" attribute' which is not correct. Please refer the attached report screenshot, where the cover image coding is correct, still getting an error.
Either the mandatory alt text rule for cover image should be removed or the error message has to be updated.
@arthicleo I added a unit test to cover the case you described: https://github.com/daisy/ace/commit/0b97b098605ee663741320cf2e27d98518e6ce3a
Note that you must use role=presentation
(or none
) if you have an empty or missing alt
attribute (or aria-label
, title
etc.). Conversely, if you are using role=doc-cover
you must specify accessible text.
Please provide the following details if possible or relevant:
ace -v
command).node -v
command).--verbose
option).Following the mapping in "EPUB Type to ARIA Role Authoring Guide", we have to put a role doc-cover for the EPUB cover image. That image is declared explicitly in the manifest with the property "cover-image". Ace should verify that the img tag for that specific image has the role "doc-cover" and report a violation if not.