Finding Some Firefox Accessibility Problems With GreaseMonkey
By user12607856 on Oct 02, 2007
After learning GreaseMonkey and doing a fun project for myself, I thought it would be a good idea to see how useful it was for something job related.
As you probably know, I'm part of the team working on Orca, a Python based screen reader for Linux and Solaris. One of the things we are trying to do is make sure the Firefox 3 browser is accessible to people who are blind or have low vision.
As it currently stands, Orca does a pretty good job with most Firefox web based content, but occasionally there are some elements that are problematic. If a web page contains elements which have a style which has:
- floats: (float:left; float:right;)
then Orca goes into a tizwas.
Here's where GreaseMonkey can help. I've put together a simple first version of a script that will, for every web page, look to see if it contains these style properties. If it does, then it adds an element to the top of the web page to indicate that this web page sucks and a couple of links are provided, to allow the user to either remove the offending elements, or to highlight them.
There are a couple of things I'd like to change, but I haven't worked out how to do it yet. Suggestions would be most welcome.
- For highlighting problematic elements, I currently set their
background to red. If they already have a red background, then
they aren't going to show up. It would be nice to either use a
red dashed box around the offending elements and/or make them
blink to show exactly where they are.
- For certain web pages, Bugzilla for example, the new elements I'm inserting at the top of the page aren't showing up properly. They are being overwritten by the rest of the web page. There must be some magic to "push" the rest of the web page down below them.
A couple suggestions for the next version (thanks Joanie) are:
- When the user clicks on the new link at the top of the page to
remove the offending elements, then when that's finished, that
link should be replaced with a message that says "offending elements
One thing that should be noted is that most web pages have one or more elements that match the problematic ones above. Our own Sun blogs main page and Google are good examples. My own blog is another offender. In fact, if I use this GreaseMonkey script to remove those elements, it completely removes the two outer columns. Whereas this script is useful for tracking down web pages that are causing us problems, it's not the solution for making them more accessible.