Add missing img.alt tags

This commit is contained in:
Grahame Grieve 2022-09-08 22:45:24 +10:00
parent 4cbbce4ec8
commit ace807bca0
2 changed files with 3 additions and 3 deletions

View File

@ -120,9 +120,9 @@ public class CDARoundTripTests {
//
// assertEquals("Skin Exam", fp.evaluateToString(e, "component.structuredBody.component.section.component.section.where(code.code='8709-8' and code.codeSystem='2.16.840.1.113883.6.1').title.dataString"));
// // <div>Erythematous rash, palmar surface, left index finger.
// // <img src="MM1"/></div>
// // <img src="MM1" alt=\"img\"/></div>
// String text = fp.evaluateToString(e, "component.structuredBody.component.section.component.section.where(code.code='8709-8' and code.codeSystem='2.16.840.1.113883.6.1').text");
// assertTrue(text.contains("<img src=\"MM1\"/>"));
// assertTrue(text.contains("<img src=\"MM1\" alt=\"img\"/>"));
// } catch (Exception e) {
// System.out.println(e.getMessage());
// e.printStackTrace();

View File

@ -815,7 +815,7 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
else
tc.setAttribute("style", "vertical-align: top; text-align : left; "+(c.cellStyle != null && c.cellStyle.contains("background-color") ? "" : "background-color: "+color+"; ")+"border: "+ border +"px #F0F0F0 solid; padding:0px 4px 0px 4px"+(c.cellStyle != null ? ";"+c.cellStyle : ""));
if (!Utilities.noString(icon)) {
XhtmlNode img = tc.addTag("img").setAttribute("src", srcFor(imagePath, icon)).setAttribute("class", "hierarchy").setAttribute("style", "background-color: "+color+"; background-color: inherit").setAttribute("alt", ".");
XhtmlNode img = tc.addTag("img").setAttribute("alt", "icon").setAttribute("src", srcFor(imagePath, icon)).setAttribute("class", "hierarchy").setAttribute("style", "background-color: "+color+"; background-color: inherit").setAttribute("alt", ".");
if (hint != null)
img.setAttribute("title", hint);
tc.addText(" ");