Closed aewingate closed 3 years ago
Currently the HTML presentation converts a TEI figure
to an HTML figure
, a TEI figDesc
to an HTML figCaption
, and a TEI graphic
to an HTML img
.
https://github.com/IUBLibTech/newton_chymistry/blob/master/xslt/p5-to-html.xsl#L424-L441
If you prefer not to use HTML figCaption
for the figDesc
, and instead to render the TEI figDesc
only as an HTML img/@alt
, you can replace the figDesc
template with one that does nothing, e.g. <xsl:template match="figDesc"/>
, and modify the graphic
template so that it adds the @alt
attribute as well as the @src
attribute it already does. e.g. insert <xsl:attribute name="alt" select="parent::figure/figDesc"/>
I coded just as @Conal-Tuohy commented. It seems to work pretty much! Thank you, Con!
The alt text values are no longer appearing so the issue has been resolved.
Another rendering issue we discovered in the review work is that the contents of are being displayed on Carbon instead of being hidden as alt text as in the current live site. The example below is from ALCH00051 (Keynes 62).
Live site https://webapp1.dlib.indiana.edu/newton/mss/norm/ALCH00051/
Carbon http://carbon.dlib.indiana.edu:8220/text/ALCH00051/diplomatic
The note in angle brackets about the illustrations should be there, but the viewer shouldn't be able to see the text in the red boxes unless the image doesn't load or they're using a screen reader.