You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

accessibility.xml 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "document-v20.dtd">
  18. <document>
  19. <header>
  20. <title>Accessibility</title>
  21. </header>
  22. <body>
  23. <section id="overview">
  24. <title>Overview</title>
  25. <p>
  26. This page describes the
  27. <a href="http://en.wikipedia.org/wiki/Accessibility">accessibility</a>
  28. features of Apache FOP.
  29. <a href="http://www.section508.gov/">Section 508</a> defines accessibility in the context
  30. of electronic documents for the US but it impacts also other countries.
  31. </p>
  32. <p>
  33. These features are concentrated exclusively on PDF output
  34. (Tagged PDF). There are certain implementation limitations that need to be observed
  35. and certain actions are necessary by the content creator to ensure that FOP can create
  36. a truly accessible document.
  37. </p>
  38. </section>
  39. <section>
  40. <title>Enabling accessibility</title>
  41. <p>There are 3 ways to enable accessibility:</p>
  42. <ol>
  43. <li>
  44. <strong>Command line:</strong> The command line option -a turns on accessibility.
  45. <code>fop -a -fo mydocument.fo -pdf mydocument.pdf</code>
  46. </li>
  47. <li>
  48. <strong>Embedding:</strong> <code>userAgent.setAccessibility(true);</code>
  49. </li>
  50. <li>
  51. <strong>Optional setting in fop.xconf file:</strong>
  52. <pre>
  53. &lt;fop version="1.0"&gt;
  54. &lt;accessibility&gt;true&lt;/accessibility&gt;
  55. ...
  56. &lt;/fop&gt;
  57. </pre>
  58. </li>
  59. </ol>
  60. <p>
  61. As mentioned, enabling accessibility currently only changes the way PDFs are generated.
  62. Internally, FOP maintains a reduced structure tree of the document so the target format
  63. viewer can ultimately reconstruct the natural reading order of the document. This is
  64. important for document readers that produce an aural representation of the content.
  65. </p>
  66. <p>
  67. Hint: You may need to adjust the Java heap size in order to process larger files.
  68. </p>
  69. </section>
  70. <section id="source">
  71. <title>Changes to your XSL-FO input files</title>
  72. <p>
  73. Apache FOP cannot automatically generate accessible PDFs. Some of the work can only be
  74. performed by the content provider. Following are some changes that may be necessary to
  75. your XSL-FO content so the generate documents that are truly accessible.
  76. </p>
  77. <ul>
  78. <li>Table cells require a table row as the parent.</li>
  79. <li>
  80. Ensure that the order of <code>fo:block-container</code> in a page corresponds to
  81. the reading order.
  82. </li>
  83. <li>
  84. Alternate text for images: The attribute <code>fox:alt-text</code> has been added
  85. for <code>fo:external-graphic</code> and <code>fo:instream-foreign-object</code>.
  86. </li>
  87. <li>
  88. Specify the natural language of the document using the language and country properties
  89. (or via the xml:lang shorthand property).
  90. </li>
  91. </ul>
  92. </section>
  93. <section id="testing">
  94. <title>Testing</title>
  95. <p>
  96. Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its
  97. Accessibility Check creates a report indicating any deficiencies with a PDF document.
  98. Alternatively, you can just let a screen reader read the document out aloud.
  99. </p>
  100. </section>
  101. <section id="limitations">
  102. <title>Limitations</title>
  103. <p>
  104. Accessibility support in Apache FOP is relatively new, so naturally, there are certain
  105. limitations. Please help us identify and close any gaps.
  106. </p>
  107. <ul>
  108. <li>
  109. The natural language can currently only be specified on the page-sequence level. The
  110. document language is derived from the language of the first page-sequence. It is
  111. currently not possible to override the language inside the content below the
  112. page-sequence level.
  113. </li>
  114. <li>
  115. It's currently not possible to specify the expanded form of an abbreviation or acronym.
  116. </li>
  117. <li>
  118. SVG graphics (or images in general) are treated as a single figure. Text contained in
  119. SVGs is not accessible. It's only possible to work with fox:alt-text.
  120. </li>
  121. <li>
  122. XSL-FO's role property is currently not supported. It could theoretically be used to
  123. differentiate between headings and normal text. At the moment, the two are simply
  124. identified as paragraphs.
  125. </li>
  126. <li>
  127. The side regions (region-before, region-after etc.) are currently not specially
  128. identified. Screen readers may read their content at page changes.
  129. </li>
  130. <li>
  131. The accessibility features are only available with PDF output and only if the
  132. new output implementation based on the intermediate format (PDFDocumentHandler) is used.
  133. Accessibility (Tagged PDF) is not supported by the legacy PDFRenderer.
  134. </li>
  135. </ul>
  136. </section>
  137. <section id="links">
  138. <title>Related Links</title>
  139. <p>
  140. We don't provide a comprehensive guide to create accessible documents. Below are some
  141. links with additional resources around the topic.
  142. </p>
  143. <ul>
  144. <li><a href="pdfa.html">PDF/A support in Apache FOP</a></li>
  145. <li><a href="http://www.section508.gov/">US Government - Website on Section 508</a></li>
  146. <li><a href="http://en.wikipedia.org/wiki/Accessibility">Wikipedia on Accessibility in general</a></li>
  147. <li><a href="http://en.wikipedia.org/wiki/Portable_Document_Format#Accessibility">Wikipedia on Accessibility in PDF</a></li>
  148. <li>
  149. <a href="http://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf">PDF Reference 1.4</a>
  150. (lookup chapters 9.7 "Tagged PDF" and 9.8 "Accessibility Support")
  151. </li>
  152. <li><a href="http://wiki.apache.org/xmlgraphics-fop/PDF_Accessibility">Developer-oriented details on the accessibility features (on the Wiki)</a></li>
  153. </ul>
  154. </section>
  155. </body>
  156. </document>