Most forms contain a certain amount of read-only text such as titles, captions, headings, or instructions. This text is normally displayed using label items. You should include this text in the acclabel of the appropriate input items.
This practice is an alternative to using field items to display text information.
This practice is necessary because screen readers only announces text from items that receive the input focus. Because label items are not designed to accept input from the user, they never receive the focus. As a result, the screen reader cannot read a label's text. If you use labels to separate contextual areas on a form, users with visual disabilities may be unaware of the subject change. If you repeat and expand upon the label information in the accessibility message of the appropriate items, the screen readers can inform users of any changes or instructions.
There are a number of situations in which you would use read-only text information in a form. The following diagram illustrates a section header, followed by instructions for completing medical information:
The following code creates an acclabel
option for the "Yes" check box shown in the previous diagram. Note that the check box acclabel
contains all the information displayed in the section's read-only labels, including section title, instructions, sub-heading, and the first question of the section:
This section of the form records your Medical
History. It contains a series of questions with yes and no
check boxes. If you answer yes to any of these questions,
please explain your response in the Remarks section that
directly follows the list of questions. Eyesight.
Question 1. Have you lost the use or sight of either eye?
Select yes or no. This is the Yes check box.
When a screen reader user tabs to this item, they hear: "This section of the form records your Medical History. It contains a series of questions with yes and no check boxes. If you answer yes to any of these questions, please explain your response in the Remarks section that directly follows the list of questions. Eyesight. Question 1. Have you lost the use or sight of either eye? Select yes or no. This is the Yes check box. Checkbox: not checked. To activate, press spacebar.
When an item receives the focus (for example, by using the tab key to navigate to the field), screen readers typically announce:
- The label option of the item.
- The accessibility message.
- The contents of the item.
- Any instructions the screen reader automatically adds.
As a result, you should ensure that the item's label option
and accessibility message do not repeat information. Repeating, conflicting, or out-of-order messaging can be confusing. If you have items that contain the text of a header, caption, or instruction label in its accessibility message, do not use a label option
to display labels for those items. Instead, use a separate label item to provide text for sighted users.
Whether you are using the Designer or a text editor to create or modify your form, remember:
- For sighted users, create a label item instead of a label option.
- For users with visual disabilities, ensure that you place all relevant information (section header, instructions, item information, and so on) in the acclabel.
This practice may result in lengthy accessibility messages, which is an issue for screen readers that limit message length to 256 characters. This issue can be avoided by splitting instructions across the appropriate items. Where a sighted user might prefer to read all of the instructions at the beginning of a section, it is more useful to split the instructions across multiple items for a vision impaired user.
Exceptions to this practice
If the majority of your intended users have vision impairments, you may choose to substitute read-only fields for labels containing section headers, instruction, captions, and so on.
If your accessibility messages need to be longer than 256 characters, you may need to redesign your form so that it is simpler to use.