Forms Accessibility in Adobe Acrobat: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Accessibility]] [[Category:Web Development]]
== Creating and editing forms ==
== Creating and editing forms ==


Line 7: Line 8:
* Current Document
* Current Document


==== TODO ====
=== Copying form fields between documents ===
 
In a scenario where two documents have the same set of form fields,
 
* Open the source document
** '''Tools''' > '''Forms''' panel > '''Edit'''
** Either select the form fields in the content window with the mouse, or select the form fields from the list in the Forms panel.
** Right click in the Content window > '''Copy'''
* Open the destination document.
** '''Tools''' > '''Forms''' panel > '''Edit'''
** Navigate to the target page.
** Right click in the Content window > '''Paste'''


Document what content cues influence how the form fields are added to the document.
==== How Acrobat locates form fields based on content ====
 
TODO: Document what content cues influence how the form fields are added to the document.


* For example, text followed by a straight line will cause a textbox to be added to the form.
* For example, text followed by a straight line will cause a textbox to be added to the form.
Line 53: Line 67:
** export value: '''Options''' tab > '''Export Value'''
** export value: '''Options''' tab > '''Export Value'''
* Both the '''Tooltip''' and '''Export Value''' are read out for checkboxes in a group. Best to make the tooltip as concise as possible if it will be read out multiple times.
* Both the '''Tooltip''' and '''Export Value''' are read out for checkboxes in a group. Best to make the tooltip as concise as possible if it will be read out multiple times.
=== Clearing form values ===
If a PDF is saved with input in textboxes, or with checkboxes or radio buttons selected, those values will persist the next time it's opened in Acrobat Reader.
To clear form values (radio buttons can't be cleared with clicking once they are selected), '''Tools''' pane > '''Forms''' > '''More Form Options''' > '''Clear Form'''.


== Form field tab order ==
== Form field tab order ==
Line 92: Line 112:
** Type: Form
** Type: Form
* Drag the tagged annotation into the new `<nowiki><Form></nowiki>` tag.
* Drag the tagged annotation into the new `<nowiki><Form></nowiki>` tag.
== Custom form field validation ==
* '''Field Properties''' (Ctrl+I) > '''Format''' tab
** '''Select Format Category:''' Custom
** Enter JavaScript into '''Custom Format Script''' and/or '''Custom Keystroke Script''' fields.
<p class="alert-warning">To set custom scripts, it's necessary to access the form field's properties by right clicking on the field itself in the content view as opposed to selecting the field in the Forms pane. When the field is selected through the Form pane, edits in those custom script fields won't save, and it's impossible to change the format to "custom", even through the same dialog is displayed.</p>
[[file:Acrobat-form-field-custom-format-dialog.png|thumb|left|form field format dialog]]


== Reference ==
== Reference ==


* [http://www.adobe.com/de/accessibility/products/acrobat/pdfs/acrobat-x-creating-accessible-pdf-forms.pdf Acrobat X Pro Accessible Forms and Interactive Documents] (Adobe.com)
* [http://www.adobe.com/de/accessibility/products/acrobat/pdfs/acrobat-x-creating-accessible-pdf-forms.pdf Acrobat X Pro Accessible Forms and Interactive Documents] (Adobe.com)
[[Category:Accessibility]] [[Category:Web Development]]

Latest revision as of 20:43, 16 March 2015

Creating and editing forms[edit]

Adding form fields to a document that has none[edit]

Tools pane > Forms > Create

  • From Existing Document
  • Current Document

Copying form fields between documents[edit]

In a scenario where two documents have the same set of form fields,

  • Open the source document
    • Tools > Forms panel > Edit
    • Either select the form fields in the content window with the mouse, or select the form fields from the list in the Forms panel.
    • Right click in the Content window > Copy
  • Open the destination document.
    • Tools > Forms panel > Edit
    • Navigate to the target page.
    • Right click in the Content window > Paste

How Acrobat locates form fields based on content[edit]

TODO: Document what content cues influence how the form fields are added to the document.

  • For example, text followed by a straight line will cause a textbox to be added to the form.
  • An rectangular outline will cause a multi-line textbox to be added, but a blank area will be passed over.

Textbox options[edit]

Multi-line (textarea)[edit]

  • with field selected > Properties (Ctrl+I) > Options tag > Multi-line: checked

Comb[edit]

The Comb setting splits the textbox into evenly spaced boxes, allowing only one character to be entered in each box.

  • with field selected > Properties (Ctrl+I) > Options tag
    • Deselect all other options (otherwise Comb won't be available).
    • Comb of number of characters to allow in the textbox.

Checkbox options[edit]

Checkbox appearance[edit]

Checkboxes seem to constructed with a border, padding inside the border, and a fill area.

When the checkbox is selected, there is always padding between the border and the box used to indicate that the checkbox has been selected.

The style of the check mark can be controlled with Properties' > Appearance tab > Text > Font Size, which will control the size of the box displayed when the checkbox is selected, and Properties > Appearance tab > Text > Text Color which will control the color of that box.

Checkbox groups[edit]

It doesn't appear possible to group checkbox form fields together. If they have the same Name they will be have like radio buttons, i.e. only one option out of all options with the same name can be selected at one time.

Radio buttons[edit]

To create a group of radio buttons give the radio buttons the same Name, with unique Export Values.

Note that radio buttons can be round or square (the appearance of checkboxes) but it's the Name value that determines if they act like radio buttons, i.e. only one option in a group can be selected at a time.

  • Tools pane > Forms > Edit Fields > Fields > select a field
  • right click > Properties (Ctrl+I)
    • field name: General tab > Name
      Note that form fields that share a Name will all have the same Tooltip value, i.e. when the tooltip value is changed for one of the options, it will update the tooltip value for all the other options.
    • export value: Options tab > Export Value
  • Both the Tooltip and Export Value are read out for checkboxes in a group. Best to make the tooltip as concise as possible if it will be read out multiple times.

Clearing form values[edit]

If a PDF is saved with input in textboxes, or with checkboxes or radio buttons selected, those values will persist the next time it's opened in Acrobat Reader.

To clear form values (radio buttons can't be cleared with clicking once they are selected), Tools pane > Forms > More Form Options > Clear Form.

Form field tab order[edit]

Form field tab order must match the flow of the document: left to right, then top to bottom, with the exception of columns where it makes more sense to go from the top to the bottom of the leftmost column, then return to the top of the next column to the right.

  • Tools pane > Forms > Edit > Fields tab
    • Drag form fields to the appropriate place in the list.
    • Note that changing the position of a field in the list will remove its tag from from the tags tree. After a field's tab position is changed, re-tag it with tags pane > options menu > Find.... (See Untagged annotations)
  • Document tab order
    • When the Accessibility Check is run after the field tab order has been changed, an error will be thrown under Accessibility Checker > Page Content > Tab Order
    • Expand the node, right click on the error message and select Fix.

Form field alternate text[edit]

Each form field must have alternate text that accurately describes the data to be collected by the field.

  • Tools pane > Forms > Edit
  • Form fields can be selected either in the document content area, or under the Fields tab.
  • With a field selected: right click > Properties (Ctrl+i)
    • Name is the label of the field. If a tooltip value is provided, this can be a code containing abbreviations, underscores and/or numbers that wouldn't necessarily make sense if it were read out loud. The Name field can contain spaces and special characters.
    • Tooltip, if provided, is the text that is read out loud for the form field. As such the tooltip value should be easily understood. If a tooltip value is not provided, a screen reader would typically fall back on the Name value.

Tagging form fields[edit]

Form fields must be represented by tagged annotations in the tags tree[edit]

tagged annotation
  • tags pane > options menu > Find...
    • Find: Unmarked Annotations
    • Search Page or Search Document
  • For each unmarked annotation that is located, click the Tag Element button.

Form field nodes must be enclosed in `<Form> tags[edit]

<Form> tags
  • Select a sibling node for the <Form> tag.
  • tags pane > options menu > New Tag
    • Type: Form
  • Drag the tagged annotation into the new <Form>` tag.

Custom form field validation[edit]

  • Field Properties (Ctrl+I) > Format tab
    • Select Format Category: Custom
    • Enter JavaScript into Custom Format Script and/or Custom Keystroke Script fields.

To set custom scripts, it's necessary to access the form field's properties by right clicking on the field itself in the content view as opposed to selecting the field in the Forms pane. When the field is selected through the Form pane, edits in those custom script fields won't save, and it's impossible to change the format to "custom", even through the same dialog is displayed.

form field format dialog

Reference[edit]