jhswift
|
I’m having difficulty understanding how to use role=”presentation” with images.
Indesign includes role=”presentation” within the img tag , but when I run the epub through ACE I get an error report with the message that “ARIA role presentation is not allowed for the given element”
I’ve tried to read as much as I can find about this role, but the information does not give any helpful information about this particular error. Most information about this role is rather technical.
Please could someone explain when, and when not, this role should be used with images?
Thanks
Jim
April 2, 2024 at 2:12 pm
|
APLN Moderator
|
Hi Jim,
Thank you for this topic! That’s strange that you’re getting an error for using this role in an image tag. Role=”presentation” is mainly used for decorative images. When an image is purely decorative, i.e., it doesn’t serve any purpose towards the understanding of the text, it is marked up with an empty alt attribute and a supporting role=”presentation” ARIA role.
For example:
<img src="image/img1.png" role="presentation" alt=""/>
The empty alt attribute is more important to include for decorative images, and the addition of role=”presentation” is recommended as a best practice. Both of these allow assistive technologies to skip over these images and provide a better reading experience.
Read more about decorative images here: https://kb.daisy.org/publishing/docs/html/images-deco.html
April 3, 2024 at 1:40 pm
|
jhswift
|
Many thanks. This is helpful.
April 15, 2024 at 12:29 pm
|