Question about role=”presentation”

  • This topic has 2 replies, 2 voices, and was last updated 3 days, 20 hours ago by jhswift.
Viewing 3 posts - 1 through 3 (of 3 total)
Question about role="presentation" thread
Author Posts
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

 

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

 

jhswift

Many thanks. This is helpful.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Want to join the discussion?

a wooden table with a white keyboard on top, and a persons hand writing on a piece of paper

View our current resources