Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.5, 2.4
-
None
-
None
-
Patch, Important
Description
Using a fo:retrieve-marker in a header static content, that is marked with role artifact breaks the accessibility tags structure tree for the next pages.
<fo:static-content flow-name="sc-before" role="artifact"> <fo:block>Header <fo:retrieve-marker retrieve-boundary="document" retrieve-class-name="title" retrieve-position="first-including-carryover"/></fo:block> </fo:static-content>
The cause:
The class org.apache.fop.accessibility.fo.FO2StructureTreeConverter switches the current FOEventHandler (converter) to one that "swallows" all events each time an artifact is found, and restores the initial converter after the artifact ends.But this gets into conflict with the retrieve markers. The retrieve marker restore state event is processed asynchronous, just before the current page is finished, and restores the FOEventHandler to the one it was available when the start retrieve marker was emmited (in our case the "swallower", because the retrieve marker was in an artifact). The result is that the "swallower" is the current FOEventHandler for the next page.
The fix:
The fix is to restore the initial handler each time the page ends:
At the end of the method: org.apache.fop.accessibility.fo.FO2StructureTreeConverter.endPageSequence(PageSequence)
add:
if (converter == eventSwallower) {
converter = structureTreeEventTrigger;
converters.clear();
}