Cannon Access

23 Sep 2010

Accessibility Bookmarklet for and Friends

Update: This issue has now been fixed, making this hack unnecessary.

Recently, the developers behind changed their site in such a way as to make voting and flagging inaccessible. So, I created a bookmarklet to correct the issue, and these functions now seem to work fine for me with a screen reader. Note that this will likely not work for older screen readers that don’t speak ARIA.

Of course the best solution would be for the StackOverflow devs to make these changes to their site directly, but until that happens, we will have to make do.

It’s amazing what just a little bit of ARIA can do.

javascript:(function(){$(‘a, .vote-up-off, .vote-down-off, .star-off’).attr({role:’link’,tabindex:’0′});})()

Simply right click the above, and save it as a bookmark. Then, when you visit the StackOverflow site, or any of their sister sites, click the bookmark, and the page will magically become accessible.

The biggest drawback to this is that you have to run the bookmarklet each time you visit a different page on the site. So, if you visit the site frequently, I suggest you install the script into Greasemonkey, and set it to run on all pages of the site.

Feedback/improvements are appreciated.