I thought I’d give an overview of some of the accessibility features we included in the first demo release of ButtercupReader.
Web Standards and Accessibility
One of the interesting aspects of this project is that, while we have built a highly accessible application, it does not comply with New Zealand Government Web Standards (nor, I suspect, with any other country’s guidelines).
In New Zealand, like other countries, we have a set of accessibility guidelines we have to follow when building web sites for government departments and agencies. The goal of such guidelines is pretty clear - to make web applications accessible to as wide an audience as possible without disadvantaging those with disabilities.
Even building an application in HTML is itself a major limitation. We all know that HTML was never intended to be the foundation for delivering complex, interactive web applications. I remember a year or two back when I thought the end of our obsession with the web was coming - smart clients were the promise of a new future and I could sense the renaissance of the rich client. But no, bloody Web 2.0 arrived on the scene and everyone went gaga for web again.
Microsoft are clearly looking to invest in Rich Internet Applications (RIA) (see .NET RIA Services) but with this comes the challenge of making this relevant in a world where accessibility is increasingly important.
So when the opportunity to work on an accessible Silverlight application came along I thought - great, let’s see what’s possible and where the future of accessible RIA might take us. It would be great if ButtercupReader prompted a rethink in the web standards community about how we can provide accessible applications over the web.
Supporting Screen Readers
One of the reasons that traditional web sites can be made accessible to screen readers is that they know how to interpret well formed HTML and can traverse a document and 'read' its contents. So what happens when you're building an application using XAML? Silverlight makes it possible to mark your XAML up with special attributes to expose accessibility information via a standard known as UIAutomation (UIA). Screen readers, and other accessibility tools, that know about UIA (or its predecessor Microsoft Active Accessibility (MSAA)) can interpret these user interface elements.
AutomationProperties.HelpText="Open a Daisy book from your local computer"
Using a tool like UISpy you can see the AutomationElement properties that have been exposed.
Mark Rideout has written a more detailed overview of Silverlight accessibility features in his article here, Creating Accessibility-aware Silverlight Content.
Other Accessibility Features
Some of the other accessibility features in ButtercupReader include,
- Shortcut Keys - all functionality is available through the keyboard. One gotcha here is that it is not possible to override the shortcut keys used by the host browser. So, for example, we couldn't trap Ctrl + F to initiate a search. Instead, we chose to implement most shortcuts as single (standard keyboard) keys.
- Self-Voicing - throughout the application, and when you set the focus to an element, you will hear speech to provide contextual information. For example, when a button receives the focus its name (AutomationElement.Name) will be spoken and when you press Numpad * additional help text (AutomationElement.HelpText) is spoken. Note that this feature relies on SAPI and currently only work in IE on Windows.
- Contrast Settings - lots of partially sighted users have a preferred contrast setting. For example, photo-sensitive users will likely choose yellow on black, whereas other users may depend on a high contrast, black on white setting.
- Zoomability - clearly, the ability to be able to zoom into text and images is important and Silverlight makes this possible without losing any quality or definition.
So you can see we've had fun on this project and I really hope it opens up some debate on the future of accessibility on the web.