public class AlternateDescriptionResolver extends Object
IAccessibleElement.
The alternate description is resolved in the following order:
1) alt attribute
2) title attribute
3) aria-label attribute
4) aria-description attribute
5) aria-describedby attribute
6) aria-labelledby attribute
If none of the above attributes are present, the alternate description is not set.
| Constructor and Description |
|---|
AlternateDescriptionResolver()
Creates a new
AlternateDescriptionResolver instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
resolve(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
Resolves the alternate description of the
IAccessibleElement based on the attributes of the
IElementNode. |
protected void |
resolveFallback(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
Resolves the alternate description of the
IAccessibleElement based on the attributes of the
IElementNode in a fallback manner. |
void |
resolveLabelableElement(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element,
ProcessorContext context)
Resolves the alternate description of the labeled
IAccessibleElement based on the attributes of the
IElementNode and ProcessorContext. |
protected boolean |
resolveLink(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
Resolves the alternate description of the
IAccessibleElement based on the attributes of the
IElementNode. |
protected boolean |
resolveSvg(com.itextpdf.svg.element.SvgImage accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
Resolves the alternate description of the
SvgImage based on the attributes of the IElementNode. |
public AlternateDescriptionResolver()
AlternateDescriptionResolver instance.public void resolve(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
IAccessibleElement based on the attributes of the
IElementNode.accessibleElement - the IAccessibleElement to which the alternate description should be applied.element - the IElementNode from which the alternate description should be resolved.public void resolveLabelableElement(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element,
ProcessorContext context)
IAccessibleElement based on the attributes of the
IElementNode and ProcessorContext.accessibleElement - the IAccessibleElement to which the alternate description should be applied.element - the IElementNode from which properties the alternate description should be resolved.context - the ProcessorContext from which the alternate description should be resolved.protected boolean resolveLink(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
IAccessibleElement based on the attributes of the
IElementNode. If the link has an img tag as a child, the alt attribute of the img tag is used as the
alternate description.accessibleElement - the IAccessibleElement to which the alternate description should be applied.element - the IElementNode from which the alternate description should be resolved.true if the alternate description was resolved, false otherwise.protected void resolveFallback(com.itextpdf.layout.tagging.IAccessibleElement accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
IAccessibleElement based on the attributes of the
IElementNode in a fallback manner.accessibleElement - the IAccessibleElement to which the alternate description should be applied.element - the IElementNode from which the alternate description should be resolved.protected boolean resolveSvg(com.itextpdf.svg.element.SvgImage accessibleElement,
com.itextpdf.styledxmlparser.node.IElementNode element)
SvgImage based on the attributes of the IElementNode.
If the alternate description is not found in the attributes, it is searched for the <descr> tag the
child nodes.
accessibleElement - the SvgImage to which the alternate description should be applied.element - the IElementNode from which the alternate description should be resolved.true if the alternate description was resolved, false otherwise.Copyright © 1998–2026 Apryse Group NV. All rights reserved.