4.3 Implementing the techniques
As a result of the above, the tutorial amends the AJAX class to add in the updateScreenReader functionality. This has two parts to it, the first is to set the focus to the point where the content has been changed. The second is to inform JAWS to update the virtual buffer. To set the focus a new variable is given to the AJAX class to hold the string of the id attribute of the element that holds the refreshed data. The class then sets the focus after the callback method is called. To set the focus a tabindex of -1 is first assigned to the element. The second is achieved by adding in a hidden update field and changing its value. This does not affect the page for a user without the screen reader software.
After testing the theory with JAWS 9.1 it is found that JAWS behaves unpredictably to the above suggestion. Since there is not a standard way of informing a screen reader of dynamic changes to a page. This becomes, at best, a small chance that the screen reader will be able to understand the changes to the page. There is a need for standardising the way browsers communicate with screen readers in order for developers to easily incorporate accessible features into dynamic web pages. The unpredictability occurs when the focus is set, Webcredible state:
“Changing the focus can be disrupting for screen reader and magnifier users especially if there are no mechanisms to return to the previous position” (Webcredible, 2008).
They recommend that the best practice is to inform a user of dynamic content and highlight any change to the page. This also takes into account other assistive software such as screen magnifiers.