Design an accessible form template

Accessibility is the quality of a given system of hardware or software that makes it usable by people with one or more physical disabilities, such as restricted mobility, blindness, or deafness. Because it makes sense to help ensure that your users can access the information that you provide, you should create Microsoft Office InfoPath form templates that are as accessible as possible. In some locations, designing accessible form templates is a requirement. For example, government guidelines in the United States require that the information and data that certain types of organizations provide be accessible to people with disabilities.

There are several ways to help ensure that your form template is accessible. For example, when you add a control to a form template, you can provide a ScreenTip (ScreenTip: A short description that appears when the user holds the mouse pointer over an object, such as a button or hyperlink.) or an accessible name for it. An accessible name is a friendly name for the control that is visible to accessibility tools. By adding a ScreenTip or an accessible name to the controls on your form template, you can help users interpret the label and purpose of the controls.

In this article


Specify a ScreenTip or accessible name for a control

When a control has a ScreenTip or accessible name specified for it, that text helps users understand the purpose of the control. Use the following procedure to specify a ScreenTip or accessible name for a control.

A ScreenTip showing the name of a field

  1. Right-click the control for which you want to add a ScreenTip or accessible name, and then click Control Properties on the shortcut menu.
  2. Click the Advanced tab.
  3. Do one of the following:
    • For a list box, combo box, multiple-selection list box, ink picture, or a drop-down list box, type the text that you want in the Accessible name box.
    • For all other controls, type the text that you want in the ScreenTip box.
  4. To test your changes, click Preview on the Standard toolbar, or press CTRL+SHIFT+B.

Top of Page Top of Page

Provide alternative text for a picture

You can specify alternative text for pictures in a form template. Alternative text is used by users who rely on screen-reading software to convert graphics on the screen to spoken words. Alternative text also appears when a user moves the pointer over a picture.

Alternative text for a picture

Using alternative text is particularly important when designing an accessible form template, because it helps users with screen readers understand the content of the picture. Use the following procedure to specify alternative text for a picture.

  1. Right-click the picture, and then click Format Picture on the shortcut menu.
  2. Click the Text tab.
  3. In the Alternative text box, type the text that you want.

 Tip   The text can be as long as you want, but some Web browsers display only a limited number of characters. Therefore, we recommend that you keep the description brief.

  1. To test your changes, click Preview on the Standard toolbar, or press CTRL+SHIFT+B.

Top of Page Top of Page

Assign a keyboard shortcut to a control

When you assign a keyboard shortcut to a control in your form template, users who are filling out forms that are based on your form template can immediately navigate to that control by pressing the keyboard shortcut that you assigned, regardless of where that control is located in the active view. Using the keyboard to work with a form is often faster than using the mouse. In addition, these shortcuts can be helpful for people with motion disabilities that prevent them from using a mouse.

 Note   In InfoPath, you can assign a keyboard shortcut to the following types of controls: text box, rich text box, drop-down list box, list box, combo box, date picker, check box, option button, picture, file attachment, button, and ink picture.

  1. Right-click the control for which you want to set a keyboard shortcut, and then click Control Properties on the shortcut menu.
  2. Click the Advanced tab.
  3. In the Access key box, type a character. An access key is a keyboard shortcut that uses the ALT key as part of the shortcut. For example, if you type N in the Access key box, the keyboard shortcut for this control will be ALT+N.

 Note   Certain keyboard shortcuts are already in use by InfoPath and other Microsoft Office system programs. Although you are free to reassign existing keyboard shortcuts to the controls on your form template, doing so can confuse users who are accustomed to these Office shortcuts. To help ensure that you don't use an existing shortcut, review the list of keyboard shortcuts that is available when users fill out InfoPath forms.

  1. To help ensure that your users know that the keyboard shortcut exists, type a label in front of the control on the form template that includes the shortcut. For example, you can type Name (ALT+N) for the label of a text box where users are supposed to type their name, so that users know there is a keyboard shortcut associated with the text box.
  2. To test your changes, click Preview on the Standard toolbar, or press CTRL+SHIFT+B.

Top of Page Top of Page

Specify a tab order for a control

When filling out a form, many people use a keyboard instead of a mouse to move from field to field. Therefore, it is important that the controls on your form template use a logical tab order. The tab order is the order in which the focus moves in a form from one control to the next as you press the TAB key or SHIFT+TAB.

The tab order in a form

By default, the tab order in a Microsoft Office InfoPath form template is left to right, top to bottom, just as it is on a Web page.

In some cases, you need to change the default tab order for your form template. For example, you can specify a custom tab order for a repeating table (repeating table: A control on a form that contains other controls in a table format and that repeats as needed. Users can insert multiple rows when filling out the form.), so that users can navigate column by column rather than row by row.

Use the following procedure to specify a tab order for a control.

  1. Right-click the control for which you want to change the tab order, and then click Control Properties on the shortcut menu.
  2. Click the Advanced tab.
  3. In the Tab index box, specify something other than 0. For example, to specify that users navigate to this control the first time that they press the TAB key, enter 1 in the Tab index box.
  4. To change the tab order for additional controls, repeat steps 1 through 3.
  5. To test your changes, click Preview on the Standard toolbar, or press CTRL+SHIFT+B.

 Notes 

Top of Page Top of Page

Additional considerations

This section contains additional considerations for creating an accessible form template.

In this section


Working with layout tables

You can use layout tables to design a more organized, professional-looking form template. A layout table is a framework that includes rows and columns for organizing and arranging the form template's content, including controls, sections (section: A control on a form that contains other controls.), logos, and pictures.

Layout table inside section on form template

Callout 1 This layout table has two rows.
Callout 2 There are three columns in the second row. The center column is used only for spacing purposes.

To create more effective layout tables, you can manually modify the XSL Transformation (XSLT) (XSL Transformation (XSLT): A language that is used to transform XML documents into other types of documents, such as HTML or XML. It is designed for use as part of XSL.) that InfoPath uses to generate a view in your form template. By doing this, you can add table header cells to your form template. Table header cells help users understand the structure of a table and improve the reading experience for people who use accessibility tools such as screen readers.

Adding table header cells to your layout tables is useful only if the controls in a particular column have a similar purpose. For example, if a column in a layout table contains controls to collect contact information, such as a person's address, telephone number, and e-mail address, you can create a table header cell for that column called Contact Information.

A table header for a column containing contact information

To manually modify the XSLT that InfoPath uses to generate the view of the form template that users see, you must extract the form template into its form files and then edit the .xsl file in an XML editor such as Microsoft Notepad.

Use the following procedure to add table header cells to a layout table.

  1. On the File menu, click Save As Source Files.
  2. In the Browse For Folder dialog box, select an existing folder in which to save the form files, or create a new folder, and then click OK.

InfoPath saves a copy of your form template (.xsn) file as a set of form files in the folder that you select.

  1. Open Windows Explorer, and then browse to the folder that contains the form files.
  2. Right-click the .xsl file that you want to modify, point to Open With on the shortcut menu, and then click Choose Program.
  3. Under Programs in the Open With dialog box, click Notepad, and then click OK.

The .xsl file opens in Notepad.

  1. In the .xsl file, locate the <tbody> element, and then place the cursor after it.

 Note   The <tbody> element may have an attribute specified, such as <tbody vAlign="top">, so if you use the Find command to search for the element, search for tbody without the angle brackets.

  1. Press ENTER to create a new line, and then type the following code to create a table header and table row.
<thead>
  <tr>
  1. For each column in your layout table, type start and end tags for a table header cell. For example, if your layout table has three columns, type the following:
 <th></th>
 <th></th>
 <th></th>
  1. Type a value for each table header cell that reflects the purpose of the controls that are stored in that column. For example, if the first column in your layout table contains controls to collect contact information, type Contact Information between the start and end tags for the first column, as in the following example.
<th>Contact Information</th>
  1. After the final table header cell, type the end tags for the table row and the table header.
 </tr>
</thead>

Find more information about using layout tables in the See Also section.

 Notes 

  • The modifications described in the previous procedure are for layout tables. If you make revisions to the XSLT for a repeating table control, you must place those changes in an <xsl:template> element in the transform and use the xd:preserve mode to prevent InfoPath from overwriting the changes that you make. Find more information about modifying the XSLT and using the xd:preserve mode in the See Also section.
  • Nesting layout tables in a form template is not recommended. Nested layout tables can be difficult for accessibility tools, such as screen readers, to interpret.

Find more information about manually editing a form template in the See Also section.

Using form features appropriately

Some InfoPath features allow you to specify dynamic formatting options that change depending on what a user types or selects in a control. For example, you can use conditional formatting (conditional formatting: The process of changing the appearance of a control, including its visibility and read-write state, based on values entered into the form.) to change the background color of a row in a repeating section (repeating section: A control on a form that contains other controls and that repeats as needed. Users can insert multiple sections when filling out the form.), depending on the data that the user enters into that row. This is useful if you want to show the status of an item that is in the repeating section. For example, in a status report form template, you can use conditional formatting to make the row for an item that is behind schedule red and the row for an item that is on schedule green.

Although this is a useful way to show the status for an item, it might not be appropriate for all audiences. People who are color blind, have low vision, or are using a black and white screen might not be able to use your form if color alone is used to convey information. You should consider designing your form template so that information is conveyed by using text in addition to color. If you use color to enhance, emphasize, or reiterate information that is shown by other means, you can help ensure that all users will be able to use your form template successfully.

Additional resources

The Microsoft Accessibility Web site at Microsoft Accessibility provides information about assistive technology for improving the lives of people with disabilities. The information on this site benefits people with disabilities and their friends and family members, people in outreach organizations, educators, and advocates.

A free, monthly electronic newsletter is available to help you keep up to date with accessibility topics about Microsoft products. To subscribe, visit Free Subscription to the Accessibility Update Newsletter.

Top of Page Top of Page

 
 
Applies to:
InfoPath 2007