Back to Accessibility Enhancements
Accessibility DAL: SetADATag
SetADATag is a new DAL function for setting accessibility tags on objects.
Use this function to set alternate text in a graphic, text label, barcode, signature, chart, vector, table, or text area object.
Syntax:
- SetADATag(ObjectName,Section,Form,Key2,ObjectType,ADATagNum)
Parameter | Description |
---|---|
ObjectName | Enter the name of the text label or field to set with an ADA tag enumeration. If all naming parameters are omitted, this parameter defaults to the current field. The system updates the first object found that matches your entry for this parameter. |
Section | Optional. Enter the name of the section. |
Form | Optional. Enter the name of the form. |
Key2 | Optional. Enter the name of the Key2 group. |
ObjectType | Enter the type of object, such as "FIELD" or "TEXT" The default is "FIELD". |
ADATagNum | The numeric value associated with a given ADA Tag name. The enumeration values are shown in a table below. |
This function optionally returns one (1) if successful or zero (0) if no object was changed.
Important:
- The object referenced by SetADATag must have an explicit name
- ADA tags are only used when producing accessible PDF output
- Although tag names are shown for selection where entered in Studio, this DAL parameter must be the enumerated value associated with that tag name and not the name text. Current tag enumeration values supported are as follows:
Tag Name | Enumeration | Semantic Meaning |
---|---|---|
Caption | 7 | A caption to describe for example a picture or a table |
Code | 37 | Marking of programming language |
Formula | 43 | Mathematical formula |
Heading | 14 | Text meant to act as a heading / define a section of text in the document |
Heading 1 | 15 | Heading level 1 tag, in most cases used a single time to encompass the main title of the document |
Heading 2 | 16 | Heading level 2 tag, in most cases used to encompass main sections or chapters of the document |
Heading 3 | 17 | Heading level 3 tag, used as necessary to encompass headings that are subsections of the previous level |
Heading 4 | 18 | Heading level 4 tag, used as necessary to encompass headings that are subsections of the previous level |
Heading 5 | 19 | Heading level 5 tag, used as necessary to encompass headings that are subsections of the previous level |
Heading 6 | 20 | Heading level 6 tag, used as necessary to encompass headings that are subsections of the previous level |
Paragraph | 13 | Used to encompass a single paragraph or standalone piece of text |
Quotation | 33 | Used for quoted content |
Zero(None) | 0 | Not a real tag, indicates that the object does not have a specific assigned tag. Can be selected to remove an existing tag from an object. |
Examples:
SetADATag("MyField", , , , , 15);
The above statement would search for the field named "MyField" on the current form section and if found, set the associated ADA Tag to 15 - a Heading 1 tag. Note that the omission of the section, form, and key2 names means that the search is limited to the currently "active" section. Omission of the ObjectType parameter means that "FIELD" is assumed.
SetADATag("MyLabel", "*", "*", "*", "TEXT", 33);
The above statement will search for the first occurrence of a text label with the name "MyLabel" found within the entire transaction and set the associated ADA tag to 33 - a Quote tag. Note the the asterisk parameters ( "*" ) means to include all within the search. Using asterisk for section, form, and key2 indicates to search the entire transaction.
SetADATag("AField", "ASection", "AForm", "AKey2", "FIELD", 99);
Although the above statement indicates to locate a given field on a specific section, form, and key2 grouping, a syntax error would actually generate because 99 is not a valid ADA tag enumeration. See the valid list of enumerations in the table above.