Accessibility/CalendarExposure

From MozillaWiki
Jump to: navigation, search

Introduction

Thunderbird 3 will be the most accessible e-mail client Mozilla has ever produced. However, the Lightning calendar extension has a few accessibility problems, most of which stem from the fact that there is no standard way to expose calendar controls to assistive technologies on the various platforms.

On Windows, screen readers previously had to deal mostly with Outlook, which provides a mixture of accessible names for their calendar grids, a parseable accessible value with all information about an appointment or task, and some screen reading magic to get at some other information.

On Linux, I (MarcoZ) do not know of any accessible calendaring app.

On Mac OS X, iCal has been made accessible by Apple using the VoiceOver screen reader. But since the Apple accessibility APIs are in many respects a lot different from the ones on Windows and Linux, this must probably be dealt with separately to translate the below proposed exposure into a VoiceOver compatible format.

The specific problem

While lists and most textboxes talk fine already in Lightning, it is the views such as the Day View, Month View etc., that cause problems. These are grids that allow a four-way navigation, but have no standard means to expose their visual information to screen readers. This information is, among possible other things:

  • The name of the current selection (time in a time slot, currently selected date, what view we're in, etc.)
  • Status (booked/free/absent) etc., for time slots in a Day View and possibly others
  • Are appointments present for the given selection (time slot, day)?

A proposed solution

A possible solution lies in the use of WAI-ARIA, as it allows for semantic exposure of roles, states and properties without having to change much, or if all goes well, any existing API code. The markup goes into either XUL files or the XBL bindings for used widgets.

The exact specification can be found here.

The controls' roles

The roles are specified with the @role attribute on the XUL element or XBL markup on the individual node.

  • grid - This is the container for any view. Its name should be the current view (day, month etc.).
  • row - the container for a single row of horizontally arranged calendar view items.
  • columnheader - For those elements that display the top row of data (day, date etc.)
  • gridcell - An individual cell (time slot, day etc.).

Optionally, rowheader can be used if there are such in any view. That role goes onto the cell that contains the caption, or header, for a single row of horizontally arranged calendar view entries.

Names

For those items that do not have screen content or the like, such as the grid control, use the aria-label attribute to specify a translateable string. This string is literal.

states

Whenever a cell becomes selected, aria-selected should be set to true, if the selection goes away, the attribute should be removed (equal to setting it to false).

Exposing calendar-specific info

The beauty of ARIA is that, once you use an attribute that is not defined in the ARIA spec, it gets translated into a regular object attribute screen readers can use to gain more information about an accessible node. So, we are free to "invent" our attributes.

The following is a list of suggested attributes for the above given problem. All strings are non-translateable.

  • aria-calstatus - used to give values such as "booked" for an item. The individual list of available status should be added in a below section.
  • aria-calappointments = number of appointments present for this particular item. If set to 0 or not present, it means that there are no appointments for this slot.
  • aria-caltasks - Number of tasks for this item. If not present or set to 0, this means that there are no tasks in the list for this item.

Values for status

the aria-calstatus can receive one of several values.

  • free - Nothing scheduled for this slot.
  • booked - slot is booked and not available for other appointments
  • absent - person is absent and cannot take appointments locally (e. g. inside the office).
  • vacation?

Others?