dita-ot icon indicating copy to clipboard operation
dita-ot copied to clipboard

No alternate text specified when reading out loud fo:basic-links

Open jlacour31 opened this issue 2 years ago • 3 comments

Expected Behavior

Acrobat reading tool should read the titles of each element inside the TOC.

Actual Behavior

The tool only say "No alternate text specified" for each entry.

Possible Solution

Adding fox:alt-text attribute in org.dita.pdf2\xsl\fo\toc.xsl resolve this issue:

<xsl:attribute name="fox:alt-text">
  <xsl:call-template name="getNavTitle" />
</xsl:attribute>

Steps to Reproduce

The steps are in https://www.oxygenxml.com/forum/viewtopic.php?f=20&t=24435

  1. Update org.dita.pdf2.fop\cfg\fop.xconf to set the following values:
<accessibility>true</accessibility>
...
<renderer mime="application/pdf">
  <pdf-ua-mode>PDF/UA-1</pdf-ua-mode>
  1. Run DITA Map PDF - based on XSL-FO transformation
  2. When the PDF is opened in Acrobat, activate Read Out Loud from View menu
  3. Go to TOC page, then back in View > Read Out Loud, Read This Page Only

Copy of the error message, log file or stack trace

transform.fo2pdf.fop: ... [fop] [WARN] Alternate text is missing on basic-link. (See position 1:15259) ...

Environment

  • DITA-OT version: 3.7.2
  • Operating system and version: Windows
  • How did you run DITA-OT? oXygen
  • Transformation type: PDF2

jlacour31 avatar Aug 08 '22 07:08 jlacour31

@jlacour31 are you able to file a pull request to add this feature to develop branch?

jelovirt avatar Aug 08 '22 07:08 jelovirt

@jelovirt sure, I was waiting for you to indicate on which branch :)

jlacour31 avatar Aug 08 '22 07:08 jlacour31

The problem occurs more generally on every fo:basic-link, I'll check in the XSLT stylesheet if there's a way to fix all the links at once.

jlacour31 avatar Aug 12 '22 11:08 jlacour31