Monday, September 22, 2008

Opera Customization for Free Accessibility Analysis

First I would like to say that I'm a fan of Opera... now not the kind of Opera that you would have to listen to. No I would not go that far. Where I live we are not big fans of that type of Opera. Opera of that sort to us would be Lynyrd Skynyrd but back to the Opera Browser™ and Deque's free accessibility analysis (

In my last post I covered creation of Google™ Button for the toolbar. In this I will cover modifying a menu for Opera to give you a nice right click option to start the analysis.

The way I want this integration to work is that when a user in on a web page they can right click and a new menu choice for the free analysis will be added.

So starting off with a fresh install of Opera™ 9.52 on Mandrivia™ Linux.

Opera Browser

Opera™ 9.52 Gotta love the Speed Dial

Next and to start this off I should say that I can not guarantee that this does not destroy your computer, your house, your car or anything else. This is what worked for me, so someone if these modifications prove the existence of alien life please let me know. So far they simply work for me.

So next select tools > preferences > toolbars.

Preferences Toolbar Menu
Preferences Toolbars Menu

Select the Duplicate option under Menu setup, and then select rename on the newly created one. Rename to compliance.

Select OK.

Now with your favorite editor open standard_menu_1.ini. The file you need to find is standard_menu_1.ini on my linux box this is located in /home/username/.opera/menu. On my Windows XP box this is in C:Documents and SettingsusernameApplication DataOperaOperaprofilemenu.

You will need to add the following lines:

Item, "Validate_508" = Go to Page, "''+ escape('%u'))"
Item, "Validate_WCAG 1" = Go to Page, "''+ escape('%u'))"
Item, "Validate_WCAG 1 and 2" = Go to Page, "''+ escape('%u'))"
Item, "Validate_WCAG 1, 2, and 3 " = Go to Page, "''+ escape('%u'))"

Each Item is on one line, and I added them just before this line: Item, M_DOCUMENT_POPUP_MENU_VALIDATE=Validate frame source

Now close your editor and restart Opera. If you navigate to a web site you should now have a new menu option when you right click on the page.

Opera Browser with Menu Items

Opera™ with New Menu Choices

I added these menu choices to the one section of the ini file, and I'm sure that you can add to others. Where I added allows you to get this menu when you are not right clicking over an image or link.. I'm sure that you can add the choices to other sections but for this post it simply works when you select in an empty content area on the browser.

When you select Validate_508 or the Web Content Accessibility Guidelines Levels this will open new tab and send the current url to Worldspace™ for analysis.

If you have any problems with this or any suggestions please let me know.


No comments: