From: Vincent Hennebert
- These features are concentrated exclusively on PDF output - (Tagged PDF). There are certain implementation limitations that need to be observed - and certain actions are necessary by the content creator to ensure that FOP can create - a truly accessible document. + Accessibility features are available only for the PDF output format and there are some + implementation limitations. Also, certain actions must be undertaken by the content creator + to ensure that FOP can create a truly accessible document.
There are 3 ways to enable accessibility:
fop -a -fo mydocument.fo -pdf mydocument.pdf
- As mentioned, enabling accessibility currently only changes the way PDFs are generated. - Internally, FOP maintains a reduced structure tree of the document so the target format - viewer can ultimately reconstruct the natural reading order of the document. This is - important for document readers that produce an aural representation of the content. + When accessibility is enabled, additional information relating to the logical structure of + the document is added to the PDF. That information allows the PDF viewer (or a + text-to-speech application) to retrieve the natural reading order of the document.
-- Hint: You may need to adjust the Java heap size in order to process larger files. -
+Apache FOP cannot automatically generate accessible PDFs. Some of the work can only be performed by the content provider. Following are some changes that may be necessary to - your XSL-FO content so the generate documents that are truly accessible. + your XSL-FO content in order to generate really accessible documents:
fo:block-container
in a page corresponds to
- the reading order.
+ Images must have an alternate text: use the fox:alt-text
extension attribute
+ (in the fox namespace) on
+ fo:external-graphic
and fo:instream-foreign-object
to specify a
+ short text describing the image.
fox:alt-text
has been added
- for fo:external-graphic
and fo:instream-foreign-object
.
+ Ensure that the order of fo:block-container
elements in a page corresponds to
+ the reading order.
xml:lang
shorthand property).
- Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its - Accessibility Check creates a report indicating any deficiencies with a PDF document. - Alternatively, you can just let a screen reader read the document out aloud. + Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its + Accessibility Check feature creates a report indicating any deficiencies with a PDF + document. Alternatively, you can just let a screen reader read the document aloud.
- Accessibility support in Apache FOP is relatively new, so naturally, there are certain + Accessibility support in Apache FOP is relatively new, so there are certain limitations. Please help us identify and close any gaps.
fox:alt-text
.
- We don't provide a comprehensive guide to create accessible documents. Below are some - links with additional resources around the topic. + Many resources providing guidance about creating accessible documents can be found on the + web. Here are a few links, along with additional resources around the topic: