-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The image alternative text is not used when generating PDF with Apache FOP formatter #2850
Comments
@radu-pisoi tested the changes on Windows, using the narrator embedded in Acrobat Reader (main menu "View->Read out loud" after enabling accessibility in the "fop.xconf". |
Hi Radu, Thanks. Regards, |
Looks like @robander committed a fix for this in: #2964 so probably this issue could be closed. |
@raducoravu 3.1 will be out in beginning of June. |
👍 |
Hey, does this work now in DITA-OT 3.x? I tried today with
I checked and the processor is running through it and the select statement is resolving correctly. But the output doesn't have the alt text. I'd expect alt text to be visible as popup text when I hover the mouse pointer or at least when the Acrobat screen reader reads the content, just as if I had entered the alt text manually in a PDF editor (e.g. MS Word). Neither. Nothing added to the PDF. To answer my own question, the
See following link: Apache™ FOP: Accessibility |
Actual Behavior
The image alternate text is not processed by the PDF transformation when generate the
XSL-FO
file. I've used theApache FOP
processor.Conforming with
Apache FOP
documentation, images must have an alternate textfox:alt-text
extension attribute (in the fox namespace) on
fo:external-graphic
andfo:instream-foreign-object
tospecify a short text describing the image.
See: https://xmlgraphics.apache.org/fop/2.2/accessibility.html
Possible Solution
Override the next template:
<xsl:template match="*" mode="placeImage">
Location:
org.dita.pdf2/xsl/fo/topic.xsl
from
org.dita.pdf2.fop
plugin:Steps to Reproduce
Add an image in a topic:
<image href="../../images/Iris_sanguinea.jpg" scale="50" alt="Alternate text"/>
oXygen
PDF
The text was updated successfully, but these errors were encountered: