I wrote a script to rename fields by creating new fields and deleting the old one, but I am having a problem with the accessibility on the fields. Before I run the script the reader reads what is in the tooltip just fine, but after it is not read. It might be that the field is just not tagged? Is there a way I can copy the tag or retag it?
Here is the section of my code that copies all the properties of the old field to the new field.
var propertiesToCopy = [
"value", "borderStyle", "strokeColor", "lineWidth", "rotation", "fillColor", "userName",
"readonly", "doNotScroll", "display", "textFont", "textColor", "textSize", "richText",
"richValue", "comb", "multiline", "charLimit", "fileSelect", "password", "alignment",
"buttonAlignX", "buttonAlignY", "buttonFitBounds", "buttonScaleHow", "buttonScaleWhen",
"highlight", "style", "numItems", "editable", "multipleSelection"
];
propertiesToCopy.forEach(function (prop) {
try {
if (prop in oldField) {
newField[prop] = oldField[prop];
}
} catch (e) {
// Suppress expected errors
}
});