J.4.6 Delivering Predictable Navigation within Forms
Although it is often the case that navigating documents is simple by virtual of the natural flow of documents, it can become complex in the case of forms being found in the document. It is highly desirable for document and template authors to define those forms such that the navigation from control to control is both intelligent and predictable. Office Open XML provides a mechanism for defining the navigation flow ( also known as tab order ) for such controls.
Consider part of a well known form:
The following mark up can be used to make the form controls on that line accessible:
<w:p>
<w:sdt>
<w:sdtPr>
<w:id w:val="1" />
</w:sdtPr>
<w:sdtContent>
<w:sdt>
<w:sdtPr>
<w:id w:val="2" />
</w:sdtPr>
<w:sdtContent>
<w:r>
<w:t>Number of qualifying children:</w:t>
…
<w:r>
<w:t xml:space="preserve"> X $1,000</w:t>
</w:r>
</w:sdtContent>
</w:sdt>
</w:p>
<w:p>
…
<w:sdt>
<w:sdtPr>
<w:id w:val="3" />
</w:sdtPr>
<w:sdtContent>
<w:r>
<w:t>Enter the result</w:t>
</w:r>
</w:sdtContent>
</w:sdt>
</w:p>
<w:tbl>
…
<w:sdt>
<w:sdtPr>
<w:id w:val="4" />
</w:sdtPr>
<w:sdtContent>
<w:tr>
…
<w:tc>
…
<w:p>
<w:r>
<w:t>1</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
…
<w:p>
<w:r>
<w:fldChar w:fldCharType="begin">
<w:ffData>
<w:name w:val="Line1Value" />
<w:enabled />
…
</w:p>
</w:tc>
</w:tr>
</w:sdtContent>
</w:sdt>
</w:tbl>
The first line of this form is broken up into two Form Text Fields and four content controls that are used as labels. The Form Text Field with a name of NumberOfChildren is associated in terms of its label with the content control that has an id value of 2. In this case, the Form Text Field with a name of NumberOfChildren has a label of Number of qualifying children:. According to the tabIndex element the first Form Text Field is navigated first.