Monotonous.org

Eitan’s Pitch

Mom Visit

September 11th, 2008 Filed under: Personal by Eitan

My mom is visiting me for the next few days. I’ll be showing her the sites, and introducing her to friends. So I guess I won’t be near the computer for the next few days. I guess it will be a fortified weekend.

No 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 »

Sahlab

June 18th, 2008 Filed under: Uncategorized by Eitan

I used to love sahlab from a mix when I was in Israel. Unfortunately, I didn’t know how to make it until recently. If you are going to be in Istanbul this summer, you will probably get the real stuff. Oh, how I envy you.
A cup of sahleb

  • Half a liter of milk.
  • 3 tbs. of corn starch.
  • 2 tbs. sugar.
  • 1 tbs. orange flower or rose water.

Pour milk in saucepan, leaving about a third of a cup out. Use the remaining milk to emulsify the corn starch. Boil the milk in the saucepan with the lid on. When the milk comes to a boil, add the emulsified corn starch, sugar and flower water. Continue stirring on a medium flame until the milk thickens.

Pour in to cups and garnish with crushed nuts and cinamon.

Orange flower water bottleThe flavor that I am familiar with comes from “mey zahar”, orange flower water, I was surprised to find this stuff in QFC in the cocktail mixer section.

2 Comments »

  • Photos

  • End Mountain Top Removal

  • Categories

  • Archives