Checking a accessibility for a page with Wave

by: Allan Thræn

If you aren’t already aware, the great people at WebAIM has provided a neat service called Wave that can check a webpage for accessibility issues and give you a chance to correct them. Frederik Vig used it as part of a cool test gadget for the gadget contest 2009 (“aha” I read your thoughts – “does this mean that there will be a contest in 2010?”. Well – stay tuned and find out).

I figured I’d extend his idea a little and make a miniature plugin that gives you the option of having wave evaluating every page from the right-click menu.

image

Since this redirects to Wave and sends along the URL of the current page it only works on publicly available urls. If you want to evaluate sites that are not yet public I recommend using the Wave Toolbar.

Download the assemblyhere. (Unzip, unblock and put in “bin” folder).

The source is here (use at own risk):

   1: using System;
   2: using System.Collections.Generic;
   3: using System.Linq;
   4: using System.Web;
   5: using EPiServer.PlugIn;
   6:  
   7: namespace EPiServer.Research.Validation
   8: {
   9:     [PagePlugIn()]
  10:     public class WaveChecker
  11:     {
  12:         public const string waveSrc1 = "http://wave.webaim.org/report?url=";
  13:  
  14:         public static void Initialize(int bitflags)
  15:         {
  16:             EPiServer.PageBase.PageSetup += new EPiServer.PageSetupEventHandler(PageBase_PageSetup);
  17:         }
  18:  
  19:         static void PageBase_PageSetup(EPiServer.PageBase sender, EPiServer.PageSetupEventArgs e)
  20:         {
  21:             sender.PreRender += new EventHandler(sender_PreRender);
  22:         }
  23:  
  24:         static void sender_PreRender(object sender, EventArgs e)
  25:         {
  26:             (sender as EPiServer.PageBase).ContextMenu.Menu.Add(
  27:                 "Wave",
  28:                 EPiServer.Security.AccessLevel.Edit,
  29:                 new EPiServer.RightClickMenuItem("Check Accessibility with WAVE", "window.location.href = '"+waveSrc1+"' + encodeURIComponent(window.location.href)", RightClickMode.View)
  30:                 );
  31:  
  32:  
  33:         }
  34:  
  35:     }
  36: }

22 July 2010


Comments

  1. gr8 many thanks !
  2. Awesome work
  3. Niiiiice. This will be very helpful!
  4. Oh, sweet simplicity! :)
  5. Hey man, http://labs.episerver.com/en/Blogs/?feed=RSS seems to be down...
Post a comment    
User verification Image for user verification  
Allan Thræn

About me

I am a product manager @ EPiServer, with a passion for the more geeky side of things. My technical interests are typically focused around user problems, user experience,  search, information management, artificial intelligence and  personalization

On top of this blog I have the blog Allan On Technology and I often crosspost.

DISCLAIMER: Unless otherwise stated in the posts, this blog expresses my personal opinions, experiments and views, not necessarilly the views of EPiServer AB.

 173 page views this week.

 

 

Syndications


Archive


Tag cloud

EPiTrace logger