See you at MAX?
I’m scheduled to be part of a group doing a preconference hands-on lab on October 2 at MAX. Details here. It would be great to see some of you at that session. Or if not that session, then at some other point during MAX.
I’m scheduled to be part of a group doing a preconference hands-on lab on October 2 at MAX. Details here. It would be great to see some of you at that session. Or if not that session, then at some other point during MAX.
I continue to be interested in the challenges of developing forms that give a good experience for visually impaired users using screen readers. Previously we have focussed on checking accessibility properties at design time. However, analysing the form design template doesn’t always fit the user workflow. There are cases where accessibility properties are populated at runtime by script or by data binding. In this case, these properties are un-populated in the design version and consequently, the design-time accessibility checker will give warnings — yet at runtime the accessibility experience may be just fine.
In addition, we want to make sure that the accessibility experience adapts to changes in dynamic forms. We need to be able to test accessibility in various states — e.g. after subforms are added or removed.
The obvious answer is to perform accessibility checking at runtime — while the form is open in Reader or Acrobat. Today we’ll look at a solution to that problem. A mechanism for instrumenting your forms to allow you to analyse the state of accessibility information at runtime.
The Solution
For those of you who want to use the solution without necessarily understanding how it works, follow these steps:
Try it out with this sample form. Note that this form dynamically populates some properties. The Designer-based accessibility checker will report twice the number of errors.
Hopefully the embedded checker is innocuous enough that you could leave it in a production form. But if not, you should be able to inject it during your testing phase and remove it when you’re ready to deploy your form.
The Deep End
For those who want to know how this works…
The challenge is to add something to your form without introducing an observer effect – i.e. analytics that can run without changes to your form UI and without impacting normal form processing.
The runtime accessibility checker is designed as a form fragment that you can drag onto any form. The fragment is a single, hidden subform with no fields, no data binding — just script.
We want to trigger the analysis script without requiring the user add a “check accessibility” button to their form. In this case, I added a propagating change event to the fragment subform. This script checks the xfa.event.change event property. If the change text is equal to “AccCheck”, we launch the accessibility checker.
The checker uses JavaScript dialogs to prompt for checks to perform and has a second dialog to display the results.
The JavaScript performing the checks is adapted from the Designer version of the accessibility checker. The main difference is that it analyses the Form DOM (the runtime) instead of the Template DOM (the design).