Monotonous.org

Eitan’s Pitch

Speclenium - Easy Setup

September 19th, 2008 Filed under: Accessibility, Technology by Eitan

I created a couple of packages that will make it easier to start using Speclenium.

Setting up the server

First, copy the Speclenium server to every test machine, if it is a Windows box, use this package, double click on speclenium.exe, everything needed for it to run is in that archive. If you are using Linux, use this package. You will need Python and Twisted installed for the Linux version.

Setting up the test suite

The test suite could be run on the same machine, or a different one. You will need Python 2.5 for this. Down load this package, adjust settings.ini for your environment, and run run_tests –help.

I need to set up a project page with all the latest packages and source code. Maybe on codetalks.org?

2 Comments »

Let’s all do it right the first time

August 25th, 2008 Filed under: Accessibility, Technology by Eitan

For the last month or so I have been plugging away and thinking of efficient and approachable ways for testing WAI-ARIA conformance across browsers. When Firefox first implemented ARIA there was plenty of hard work being done both by the Firefox developers and the assistive technology developers to assure that users will have a smooth experience when they encounter rich internet applications using Firefox. The accessible web experience is fortunately spreading with Webkit, Opera and IE working on their own ARIA implementations. What we really needed was an accessibility “acid test” to assure that these discrete implementations share enough in common so that screen readers and the likes will support all browsers with minimal blood sweat and tears.

I reached a couple of dead ends. Nonetheless I hope that most of that code has not been written in vain. For example, I have a Python library that does accessible tree comparisons using an algorithm that produces a minimal delta description. This makes it easy to quickly spot differences in large and complex accessible node trees.

Anyway, I happened upon an awesome project called Selenium that provides automated cross-browser, cross-platform web testing. This was a good find. Besides being browser and platform agnostic, Selenium is also fairly language and test framework agnostic, allowing tests to be written comfortably and integrated into any kind of test framework and scripting language.

Besides the Selenium “remote control” that runs on test target machines, I created another service called Specular, or Speclenium (the serializer and core is Specular, the specific service that works with Selenium is Speclenium). This server communicates with the remote control via XML-RPC and relays accessibility related assertions and verifications. This allows Speclenium to “do one thing well” and deal exclusively with accessibility related tests. Since Specular/Speclenium is written in Python, I was able to take advantage of both pyatspi and pyia to provide cross-platformness (Win32 and Unix). This allows writing tests that will work on both platforms.

Diagram of Selenium and Speclenium topology

Diagram of Selenium and Speclenium topology

This is what you need to get it up and running:

Note to non-git users: You don’t need to download and learn git. Github provides download links with current snapshots of the files in the repo.

Setup steps:

  1. Set up the target machine:
    1. Run selenium-server on the machine with the test environment.
    2. On the same machine run ’speclenium’, it’s a Python executable in the specular package.
  2. On another machine (or the same one), set up the speclenium test scripts.
    1. Customize tests/settings.py in the specular package. It should point to your target machines and to the available browsers. It’s pretty self explanatory.
    2. I provided some sample tests that could be run with the run_tests Python executable. Try “run_tests -h” to get an idea of how to run them.

I’ll provide a screencast in the future for the lazy folks. In any case, I hope to polish up all the steps above and make setup a pleasant and simple experience. This is important especially in Windows where prerequisites could be a pain the the behind.

Oh yeah, the other use case for this hairball is accessible web application development. If you are a l33t web developer, and you test your code with Selenium, you should use Speclenium too!

That’s a long post. I hope to make all of that less complicated and streamlined in the near future.

4 Comments »

Help Apple Help Themselves

August 21st, 2008 Filed under: Accessibility, Technology by Eitan

With the old-new hegemony called Apple, questions of interoperability are expected to arise. Especially when they offer such sexy and irresistible technology. Aaron Leventhal asks an important one, regarding web accessibility.

No Comments »

Introducing Pyia

July 1st, 2008 Filed under: Accessibility, Software, Technology by Eitan

Last week I was doing my best to dive into the wonderful world of Windows accessibility. So to flatten the curve, I decided to take shot at making a lightweight Python MSAA client library, Pyia.

It is heavily inspired by pyatspi’s class mixins. pyOrbit made it very easy to do this in pyatspi, making CORBA friendly and Pythonic. Comtypes, does the same in Windows, making COM cool as a cucumber.

Accessible objects emulate containers for easy access to children nodes. Also notice a few convienient methods, like getDesktop which returns the desktop client. Also getStateName will return a human readable list of states rather than a bitmask.

>>> import pyia
>>> desktop = pyia.getDesktop()
>>> for window in desktop:
        if not window.accState(0) & \
          pyia.STATE_SYSTEM_INVISIBLE:
          print window
 
[window | ]
[window | Python Shell]
[window | Mozilla Firefox Start Page - Mozilla Firefox]
[window | Program Manager]
 
>>> desktop[14].accStateName()
u'unavailable invisible'

This might be a bad idea, but I added some AT-SPI concepts, for example a registry, where you connect event callbacks. Also, events are wrapped in structures with a “source” field that is a reference to the accessible that is responsible for the event. There is no extra wire traffic because the reference is not retrieved until the source field is either explicitly called, or the event is printed (converted to a string).

>>> import pyia
>>> def event_cb(event):
        print event
 
>>> pyia.Registry.registerEventListener(
        event_cb, pyia.EVENT_OBJECT_FOCUS)
>>> pyia.Registry.start()
gainFocus
        source: [client | Mozilla Firefox Start Page - Mozilla Firefox]
        window: 524618
        thread: 568
        tstamp: 14692927
gainFocus
        source: [client | Python Shell]
        window: 1573178
        thread: 352
        tstamp: 14694599
>>>

You could try this stuff out by checking it out from Github.
If that is too much overhead, here is a binary Windows installer.

You will need the comtypes Python module.

6 Comments »

I *heart* Translators

June 12th, 2008 Filed under: Software, Technology by Eitan

I know that I am supposed to be all gratuitous and all when it comes to translators who do a thankless job, and improve software by orders of magnitude to make them accessible to many locales. I usually am very thankful.

In the past month I have briefly turned my back Accerciser trunk, and in that time some cuddly translator managed to bugger it not once, but twice.

Once when someone uncommented a comment in the LINGUAS file, which resulted in an unconfigurable tree. Another time when someone changed a *.po file to have executable permissions. This was more annoying, since there is some script there in s.g.o’s guts that rejects any commit if the repo has an executable. Now you know me, I never look at the output message after I commit to SVN, especially now since I am doing it through git. Result: all my commits to Accerciser in the last month have been rejected, and I never realized it.

I know what you all are thinking:

  1. Why don’t you just look into the Subversion history, and see who is messing with you? Well, I prefer to remain ignorant, and make sweeping accusations - I am bored.
  2. How in hell did an executable po file get into the repo in the first place? I don’t know, and searching for the answer might lead me to the answer of the first question, so I won’t bother.

4 Comments »

  • Photos

  • End Mountain Top Removal

  • Categories

  • Archives