Techniques/PDF/Ensuring correct tab and reading order in PDF documents
STATUS
- entered by AWK
Applicability
Tagged PDF documents.
This technique relates to:
- Success Criterion 2.1.1 (Keyboard)
- Success Criterion 2.1.3 (keyboard (No Exception))
- Success Criterion 2.4.3 (Focus Order)
User Agent and Assistive Technology Support Notes
See PDF Technology Notes for information on user agent and assistive technology support.
Description
The intent of this technique is to ensure that users can navigate through content in a logical order that is consistent with the meaning of the content.
The logical reading order of a PDF document is based on the order of the elements in the PDF tag tree. This logical reading order includes interactive elements, as well as non-interactive elements such as simple text objects.
The logical reading order of PDF content corresponds to the visual order on the screen. For keyboard users, the tab order through content, including interactive elements (form fields and links), determines the order in which users can navigate the content. The tab order must follow the same sequence as the logical reading order of the document.
If the logical reading order is not correct, assistive technology users may not be able to understand the content. For example, some documents use multiple columns. In this case reading order is clear visually to sighted users as flowing from the top to the bottom of the first column, then to the top of the next column. But if the document is not properly tagged, a screen reader may read the content in an incorrect order.
The simplest way to ensure correct logical reading order is to structure the document correctly in an authoring tool that supports proper conversion to tagged PDF. Note, however, that pages with complex layouts that include items such as graphics, tables, footnotes, side-bars, form fields, and other elements may not convert to tagged PDF with the tags in the correct logical reading order. These inconsistencies must then be corrected with repair tools such as Acrobat Pro.
When a PDF document containing form fields has a correct logical reading order, all form fields are contained in the tab order in the appropriate order, and in the correct order relative to other content in the PDF. Common tab-order errors include:
- Form fields missing from the tagged content.
- Form fields in the wrong location in the PDF content; e.g., at the end of non-interactive content.
Examples
Example 1: Creating a 2-column document using Microsoft Word 2007
This example is shown with Microsoft Word. There are other software tools that perform similar functions. See the list of other software tools in PDF Authoring Tools that Provide Accessibility Support.
Multi-column documents created using Word's Page Layout > Columns... tool typically are in the correct logical reading order when converted to tagged PDF. The image below shows Word's Columns tool.
This example is shown in operation in the working example of 2-column document using Word 2007 (Word file) and example of 2-column document using Word 2007 (PDF file). Any hyperlinks included within the columns of text will be focusable in the order that they appear within the document’s logical order.
Example 2: Creating a 2-column document using OpenOffice.org Writer 2.2
This example is shown with OpenOffice.org Writer. There are other software tools that perform similar functions. See the list of other software tools in PDF Authoring Tools that Provide Accessibility Support.
Multi-column documents created using OpenOffice.org Writer's Format > Columns... tool typically are in the correct logical reading order when converted to tagged PDF. The image below shows Writer's Columns tool.
This example is shown in operation in the working example of 2-column document using OpenOffice Writer (OpenOffice file) and working example of 2-column document using OpenOffice Writer (PDF file). Any hyperlinks included within the columns of text will be focusable in the order that they appear within the document's logical order.
Example 3: Setting the tab order for one or more pages using Adobe Acrobat 9 Pro
This example is shown with Adobe Acrobat Pro. There are other software tools that perform similar functions. See the list of other software tools in PDF Authoring Tools that Provide Accessibility Support.
In a tagged PDF document:
- Open the Pages panel by either:
- Select one or more page thumbnails.
- Access the context menu for the selected thumbnail(s) and select Page Properties...
- Select the Tab Order tab in the Page Properties dialog.
- Ensure Tab Order is set to "Use Document Structure".
This example is shown in operation in the working example of setting the tab order (Word file) and working example of setting the tab order (PDF file). This example assumes that the document structure represents a correct logical order for the document – if the logical order of the document is not correct then the tab order that depends on it will be incorrect also.
Example 4: Repairing the document structure using the Tags panel in Adobe Acrobat 9 Pro
This example is shown with Adobe Acrobat Pro. There are other software tools that perform similar functions. See the list of other software tools in PDF Authoring Tools that Provide Accessibility Support.
The below image shows a document with an error in the document structure. In this image the heading with the text "Required field" appears in the tag order before the heading with the text "Please complete the following form".
To correct the document structure in this example use the Tags panel, and either
- Drag-and-drop the H1 tag to precede the required-field text (tagged H2), or
- Cut-and-paste the H2 tag to follow the H1 tag.
In the following image, the document structure is correct for the text and header. That is, the content elements H1 and H2 have been switched into the correct reading order (the "Required field" text was also modified to be a paragraph tag instead of a heading).
Example 5: Checking the reading order using Reflow in Adobe Acrobat 9 Pro
This example is shown with Adobe Acrobat Pro. There are other software tools that perform similar functions. See the list of other software tools in PDF Authoring Tools that Provide Accessibility Support. Adobe Reader also supports reflow and can be used for analysis of the reading order with this tool, but the repair requires a tool capable of editing the PDF.
To quickly check the reading order of your PDF document, use the Reflow view in Adobe Acrobat Pro as follows:
- View > Zoom > Reflow
If the tagged PDF does not reflow in the correct reading order, you need to verify that the logical order of the document is correct using the Acrobat tags panel or another tool capable of showing the logical order. The logical order may differ from the order of reflowed content in some cases because the reflow process only operates on one page of the PDF document at a time – if a PDF has content spanning pages (e.g. a table with the left half on one page and the right half on the next) then reflow will not accurately represent the logical order.
Note: The reflow feature in Adobe Acrobat forces some background colors and patterns to be hidden, which can cause text which is displayed with a colored or patterned background to seem to disappear if that text is the same color as the document background. If the document contains text which is the same color as the document background, it may be useful to select a high-contrast color scheme in Acrobat's accessibility preferences to verify that the colored text appears in the correct order.
If the reflow order and the logical order are incorrect, you can repair reading order problems in the source document and re-convert the document to tagged PDF. If you do not have access to the source document and authoring tool or the order issues cannot be address this way, you can use Acrobat’s Order panel in the TouchUp Reading Order tool or the Acrobat Tags panel to resolve reading order problems (see Example 4 for information on addressing the issue with the tags panel).
The following image shows a 2-column document converted to tagged PDF.
The following image shows the same 2-column document in reflow view.
Resources
- Section 14.8 (Tagged PDF) in PDF 1.7 (ISO 32000-1)
- PDF and Accessibility
- Adobe Acrobat 9 Pro Help
- Making PDF documents accessible with Adobe Acrobat Pro
- Using gaming macros for PDF remediation
Related Techniques
- G57: Ordering the content in a meaningful sequence
- G59: Placing the interactive elements in an order that follows sequences and relationships within the content
- G202: Ensuring keyboard control for all functionality
Tests
Procedure
- Verify that the document structure is in the correct reading order by one of the following:
- Read the PDF document with a screen reader or a tool that reads aloud, listening to hear that each element is read in the correct order.
- Reflow the pages and visually inspect the reading order to ensure that the reflow order matches the expected reading order and that it matches the order of the tags shown by a tool that is capable of showing the tagging.
- Use a tool that exposes the document through the accessibility API, and verify that the reading order is correct.
- Verify that the tab order is correct for focusable content by one of the following:
- Use the tab key to traverse the focus order in the document.
- Use a tool that is capable of showing the page object entry that specifies the tab order setting to open the PDF document and check that the setting has the value "Use Document Structure" for all pages in the document.
Expected Results
Checks #1 and Check #2 are true.