Archive for August, 2008

Retrieving HTML from Dynamic Pages

Thursday, August 28th, 2008

When testing dynamically generated web pages for accessibility, it can be difficult to get to the HTML source code that is the end result being rendered by the browser. Often choosing the browser’s View Source code option presents a lot of JavaScript calls and so forth that does not immediately make apparent what is actually being rendered to the screen.

 

One method to get at the source code that is worth a try, especially for pages that do not use frames, is to enter some JavaScript into the browser’s address bar to get an immediate action, similar to a development tool’s Immediate window.

This line will copy the HTML that is between the <Body> and </body> tags of the open webpage to the clipboard:

Javascript:window.clipboardData.setData(’text’, document.body.innerHTML);

 

Press Enter to execute this line after typing or copying it into the address bar.

In Internet Explorer 7 you may be presented with a warning message that the script is wanting to access the clipboard, you will need to allow it if you wish the HTML to be copied.

Then paste the contents of the clipboard into a text editor and view it.

 

Variations of the above DOM reference (document.body.innerHTML) should retrieve specific portions of the page if you would like to more specifically pinpoint an area.

 

Accessibility Inspector on the Mac

Tuesday, August 19th, 2008

In Mac OS 10.4 and later, Accessibility Inspector is available to test the accessibility information provided by the NSAccessibility API. When the Developer Tools (XCode) are installed Accessibility Inspector can be found in /Developer/Applications/Utilities/Accessibility Tools.

The Developer Tools can be downloaded from the Apple Developer Connection website: connect.apple.com. (A free Apple account is required.) The website says XCode is also on the OS media, however you can guarantee yourself the up-to-date version by checking the website.

 

Note: the fine print says “To use Accessibility Inspector, be sure to enable assistive applications in the Universal Access Preferences.”

 

After I downloaded and installed XCode, using the default settings for the install, Accessibility Inspector and Accessibility Verifier were in the location /Developer/Applications/Utilities/Accessibility Tools. This location can be reached using Finder.

If you are using VoiceOver as I do, you may be tricked by Accessibility Inspector in that it may seem like it has not loaded. It is put into what VoiceOver calls a “system window” and it does not gain usable focus. I found that it is necessary to use VoiceOver’s Application List to move focus to it. (VO+F1, F1. Recall VO stands for CTRL+Option in Apple/VoiceOver speak.)

 

My preliminary examination of Accessibility Inspector indicates that it only tracks the object that the mouse points at. Therefore you need to find the object you’re interested in with the mouse, which seems very tedious and not as nice as Inspector on Windows’s ability to track keyboard focus and the cursor.

If you can get Accessibility Inspector’s focus to the object you’re interested in, be sure to lock it there with Command+F7 before switching to its window.

Welcome

Friday, August 8th, 2008

Hello everyone! This is my first “real” blog. This first post is to welcome you to check out this blog from time to time such as by adding it to your RSS reader. (And also to see if the posting feature works, just in case you wanted to know that.) 

 

The blog will have some snippets of information that are useful, and probably some stuff (such as in sports) that are useful to no one. If we keep it categorized you may be able to find the useful stuff. Best of luck! 

 

And if you have a favorite thought to share, or topic to discuss, share…