IUBLibTech / newton_chymistry

New version of 'The Chymistry of Isaac Newton', using XProc pipelines to generate a website based on TEI XML encodings of Newton's alchemical manuscripts, and Apache Solr as a search engine.
2 stars 0 forks source link

figDesc and alt text #105

Closed aewingate closed 3 years ago

aewingate commented 3 years ago

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/ image

Carbon http://carbon.dlib.indiana.edu:8220/text/ALCH00051/diplomatic image

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.

Conal-Tuohy commented 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"/>

tubesoft commented 3 years ago

I coded just as @Conal-Tuohy commented. It seems to work pretty much! Thank you, Con!

image image
wehooper commented 3 years ago

The alt text values are no longer appearing so the issue has been resolved.