Tagged PDF generation: Don't create NonStruct elements for TextLeafAccessibles
Categories
(Core :: Disability Access APIs, enhancement)
Tracking
()
People
(Reporter: Jamie, Unassigned)
References
Details
Spun off bug 2055405 comment 27.
Currently, for every TextLeafAccessible, we generate a NonStruct element in the PDF struct tree. These extraneous elements increase the size of the PDF and ideally wouldn't be present. However, these are currently necessary so that SkPDF can correctly associate the text drawn in the content stream with the right position in the struct tree. If we associate the text with the parent, that causes problems where the parent contains a mix of text leaves and other elements. SkPDF will try to guess in that case, but the guess could be wrong where the text is rendered in a different order to the order in the accessibility tree (reading/logical order).
We could fix this by tweaking SkPDF to accept a placeholder node in the struct tree which can be replaced with the text when it is encountered, rather than the text becoming a child of that node. I suspect that'd be a pretty big lift, though.
Description
•