View Single Post
Old 01-10-2023, 10:28 PM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,816
Karma: 6000000
Join Date: Nov 2009
Device: many
From that link, there is this example:

Code:
<p>...</p>
<figure id="illustration-10">
	<img alt="An apple and a pear inside a bowl, resting on a table." src="../images/illustration-10.jpg" epub:type="z3998:photograph"/>
	<figcaption>The Monk’s Repast</figcaption>
</figure>
In this case there is no svg wrapper, and no title or desc fields (aria or otherwise), wouldn't the figcaption be a better short descriptor than the img alt?

Since the title attribute is allowed on the figure tag, perhaps using that would be best since it would not be seen directly while at the same time allowing its value to be different from the alt value, and if need be longer or shorter than the figcaption itself. The epub editor can easily choose to fill that in however they want before running the plugin.

So perhaps the order is look for title attribute on figure tag, and if exists, use it, if not then use the figcaption that is a child of that figure tag.

This would probably be helpful to the most people.

I would need to see an exact examples with svg wrappers if you wanted that case handled as well.

Last edited by KevinH; 01-10-2023 at 10:33 PM.
KevinH is offline