We are creating a large table using iText 7 we are almost fully 508 complaint however we are missing the table summary rule.
Is there a way to add the table summary at creation time using iText 7?
rossfrank
It is possible to add AccessibilityProperties to the Table object itself. The Summary needs to be added through a PdfDictionary
PdfDictionary attr = new PdfDictionary();
attr.put(new PdfName("Summary"), new PdfString("Info about the table"));
table.getAccessibilityProperties().addAttributes(new PdfStructureAttributes(attr));
ApiDocs can be found here
I tried the solution above, but unfortunately Adobe's Summary Accessebility Check failed.
According to the specification, the acceesibility properties' structure should be a bit different. One should use the next line:
tblContact.getAccessibilityProperties().addAttributes(new PdfStructureAttributes("Table").addTextAttribute("Summary","Table summary text" ));
来源:https://stackoverflow.com/questions/51328362/itext7-508-table-summary