Library tutorials & articles

Accessibility for Web Developers

Guideline 8

Guideline 8: Ensure direct accessibility of embedded user interfaces

Scripts, applets, and other objects that have a user interface should be compatible with assistive technologies, such as screen readers, and screen magnifiers. This guideline has 1 checkpoint.

Important - Priority 1 Checkpoint 8.1 Make programmatic elements such as scripts and applets directly accessible or compatible with assistive technologies

This checkpoint is a priority 1 checkpoint if functionality is crucial to the understanding or context of the document, and not presented elsewhere. Otherwise, it's a Priority 2 checkpoint. Programmable objects, such as applets, movies, and scripts, which have their own interface, must be accessible (see guideline 6.4). If the interface cannot be made accessible due to limitations in the type of object, then an alternative accessible solution should be provided. Flash MX addresses some basic accessibility issues, such as allowing you to provide text equivalents for images, but still falls short of offering a truly accessible interface.

Java supports accessibility through the javax.accessibility package, available in all releases of the Java 2 platform. An AccessibleContext object provides information and functionality necessary to ensure a particular component is accessible. JFC/Swing! components that don't have editable text, have accessible names and descriptions set automatically. In circumstances where a component does not have an accessible name or description, it can be provided directly through the object's AccessibleContext.

AccessibleContext context = email.getAccessibleContext();
context.setAccessibleName("Email");
context.setAccessibleDescription("The email address of a friend");

Objects should be independent of an input device. This is achieved in Java by providing mnemonics and keyboard accelerators that allow objects to be controlled through the keyboard as well as a pointing device. The setLabelFor method of the Label component allows you to explicitly bind a label to a particular component.

' Associate a label with a component
JLabel label = new JLabel("Enter your username:");
label.setDisplayedMnemonic('U');
label.setLabelFor(username);

' Set a mnemonic for a menu
JMenu menu = new JMenu("File");
menu.setMnemonic('F');

' Set a keyboard accelerator for a menu item
JMenuItem item = new JMenuItem("Open");
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.SHIFT_MASK));

Documents with scripts should be accessible if scripting is not supported, or has been switched off (see guideline 6.3).

Further Reading

Comments

  1. 08 Apr 2004 at 12:43

    My question is related to implementing Accessibility when using a datagrid, a datalist, XML, and/or a database.  All the info has been advocated in many circles and I would like to comply using ASP.NET and XML.NET.


    In many cases we are writing our ASP.net code to give access to data that is already in place and has been used for a considerable amount of time.  The biggest problem is that many databases and XML files are already set in place and we cannot change the data ( or the powers that be are unwilling to do so).  Likewise we are not in a position to add columns to the information in support of addressing Accessibility issues (for ex. a column for dynamic insertion of an ALT tag to explain images stored inside of the database, addition of supportive information (summary, caption, and scope) when tabular data is dynamically built from an XML data file as in


    <table width="90%"  border="0" cellpadding="4" summary="this summary">
     <caption>
     this caption
     </caption>
     <tr>
       <th scope="col"> </th>
       <th scope="col"> </th>
     </tr>
     <tr>
       <td> </td>
       <td> </td>
     </tr>
    </table>


    AND / OR a dynamically built link that usually would be <a href="http://www.here.com" target="_blank">go here</a>


    but really should be constructed as the code below for Accessibility reasons


    <a href="http://www.here.com" tabindex="3" title="A location to enjoy" accesskey="1" target="_blank">go here</a>


    So what can we do to increase Accessibility in these instances beyond adding to the XML or the database?


    Another issues to address would be in dynamic paging of a datagrid where the use of numeric or alpha characters are used to paginate through the data.

  2. 01 Jan 1999 at 00:00

    This thread is for discussions of Accessibility for Web Developers.

Leave a comment

Sign in or Join us (it's free).

Gez Lemon I'm available for contract work. Please visit Juicify for details.
AddThis

Related podcasts

  • Episode 15 Bug Review

    In this episode Matthew and Federico sit down to talk about some interesting bugs and lessons learned that our team has run across while testing ASP.NET. This is a different type of show that we are experimenting where the bugs take center stage.News *Silverlight 3 is releasedBugs Showca...

Want to stay in touch with what's going on? Follow us on twitter!