diff --git a/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java b/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java
index 135cb459c..ea5e70407 100644
--- a/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java
+++ b/openhtmltopdf-pdfbox/src/main/java/com/openhtmltopdf/pdfboxout/PdfBoxAccessibilityHelper.java
@@ -75,7 +75,8 @@ private static Map> createTagSupplier
suppliers.put("th", TableHeaderStructualElement::new);
suppliers.put("a", AnchorStuctualElement::new);
-
+ suppliers.put("span", SpanStuctualElement::new);
+
return suppliers;
}
@@ -236,7 +237,30 @@ void finish(AbstractStructualElement parent) {
finishTreeItems(child.children, child);
}
}
-
+
+ private static class SpanStuctualElement extends GenericStructualElement {
+ @Override
+ String getPdfTag() {
+ return StandardStructureTypes.SPAN;
+ }
+
+ @Override
+ void finish(AbstractStructualElement parent) {
+ SpanStuctualElement child = this;
+
+ createPdfStrucureElement(parent, child);
+
+ if (box.getElement() != null) {
+ String alternate = box.getElement().getAttribute("title");
+ String lang = box.getElement().getAttribute("lang");
+ child.elem.setAlternateDescription(alternate);
+ if (!lang.isEmpty()) child.elem.setLanguage(lang);
+ }
+
+ finishTreeItems(child.children, child);
+ }
+ }
+
private static class ListStructualElement extends AbstractStructualElement {
final List listItems = new ArrayList<>();