W3C WAI

XML and Accessibility

Daniel Dardailler (danield@w3.org)


Abstract

This document introduces concepts related to XML Accessibility and provides guidelines for new DTD/Schema/Profile designers and editing tool developers. Compared to HTML or SMIL, XML is one level up, and in addition to the usual device independence issues, we need to pay attention to the issue of conveying semantics for otherwise unknown grammar.


Introduction

XML is a meta-syntax, used to declare grammars (called DTDs - but see the caveat about our use of the term DTD in the definition section at the end of the paper) for new computer languages and formats (called markup). These DTDs can be classified along two different axis:

Definitions:

Details on these definitions are provided at the end of this document.

An XML DTD is accessible if it enables and promotes the creation of accessible documents

A document is accessible if it can be equally understood by its targeted audience regardless of the device used to access it.

This document only addresses User-centric DTDs. This does not imply that the first type of DTD doesn't have accessibility issues or features (see how XSL can help Braille formatting for instance). However since they are not directly conveying information presented to the end-user, they are out of our scope here. In a sense, machine-centric DTDs have no connection to user interface accessibility, and one might ask if the commutative proposition is true: DTDs with no accessibility issues are the ones that must reach the right level of machine-centricity.

For User-centric languages, the message is simple: be device independent and export your semantics as much as you can.

While the priority is stronger on the first aspect (multi-modality), both aspects are important, as without the knowledge of the meaning of the XML elements and attributes, there is little chance that alternative user agents can do something intelligent with just the document bits.

This semantics knowledge can be provided through human readable documentation of course, but having machine readable assertions of some semantics that can then be used to present the document in various media is paramount for pervasive access (i.e., you don't need a programmer, you just need a program).

The ICADD committee was a pioneer in this topic, for SGML accessibility and ways to convey arbitrary DTD semantics (using SDA or LPD mechanisms). A few years later, ICADD has not really been adopted and we're still trying to solve the same problem, albeit with more experience in the field of HTML accessibility, and applied to XML this time.

The next section provides a list of abstract guidelines, checkpoints and techniques that DTD designers should follow to achieve accessibility when designing new UI XML DTDs.

The techniques are meant to point at existing or new mechanisms used to implement these guidelines through reuse and modularization of XML parts. A note at the end of this document explains why distinguish guidelines and techniques.


Guidelines for designers of UI-oriented XML tagset

As with the other WAI guidelines, we provide "abstract" guidelines, and associated checkpoints and techniques.

  1. Follow general principles of separation of structure/content and presentation
    • rationales: end-users can adapt the content to their presentation constraints
    • checkpoints:
      • no presentational elements or attributes in the markup
      • support standard linkage of Style sheets
      • provide default stylesheets for multiple media (e.g. aural), not just graphical
    • techniques:
      • list of typical style properties that should be avoided in markup
      • example of <?xml-stylesheet?> syntax
      • example of aural css usage
  2. Enable text-only presentation of your documents
    • rationales: text is the lowest common denominator to all output media
    • checkpoints:
      • make sure all "rich" non-textual media elements in your markup can be bound to an alternate textual piece
      • make sure this is done in the most natural way possible
    • techniques:
      • point at XHTML modules for OBJECT, MAP element
      • audio/video: point at SMIL SWITCH
      • graphics: point at SVG title/desc
  3. Provide rich native structural/navigational constructs
    • rationales: greatly facilitates non-visual browsing and scanning
    • checkpoints:
      • strong sectioning/auto generation of TOC
      • grouping and reuse
      • for specialized DTDs (SVG, SMIL, MathML), work on one-dimensional (e.g. voice) scenario
      • provide basic information of inline or block nature of elements
    • techniques:
      • XHTML list, table, grouping structure/module
      • navbar/toc RDF marker, clipart/outline class in SVG
      • XSLT mydtd-to-xhtml mapping ?
      • use DIV and TITLE on top of any markup
  4. Provide atomic semantic markup
    • rationales: to ease machine-understanding and machine-processing of documents
    • checkpoints:
      • make sure the meaning of common things is available to user agent for clever processing
      • do not reinvent the wheel, reuse well known schema if possible
      • provide a DOM specific API to ease UA access to you data
      • allow metadata linkage in your syntax
    • techniques:
      • use xlink for pointers, xml:lang for language variance
      • XHTML phrasal module: acronym, abbrev, quote, etc
      • publish new RDF/Schema documentation widely and openly
  5. Support a key-based (discrete) input model
    • rationales: discrete key access, if available, can easily be remapped to all sorts of input mode
    • checkpoints:
      • provide a key based navigation model to your elements
      • think in terms of symbolic events, not device dependent events.
    • techniques:
      • onActivate, not onMouseClick
      • look at image map info
      • tab order, accesskey
An additional advice we give to DTD designers is that in their specification itself (the documentation) they always emphasize the accessibility features of their new language and try to include accessibility as part of any conformance statement they introduce (be it for the document themselves or reader/editor of the language). See the SVG specification for an example of both practices.

Approach on Guidelines/Techniques separation

In our presentation of guidelines for XML accessibility, we separate abstract guidelines from implementation techniques. This allows us to talk about the guidelines without spending the time up-front to solve the implementation issues.

The fact is: there are several techniques for achieving the same result and people's decision will be a function of time and product available and their own commitment to access (it's flexible)

For instance, we might want to have the XML designer indicate what constitute "list" elements in a given markup, and this in turn can be implemented using various techniques:

Along with the choice of the metadata mechanism and vocabulary comes the issue of semantics availability: how does one access the DTD and possible XSLT or schemata from an instance document ? This is sometimes referred to as XML packaging or related-resource discovery.


Conclusion

In this paper, we looked at providing clear definitions and requirements related to XML accessibility. We think abstract guidelines and verifiable checkpoints/techniques (using implementation mechanisms associated with abstract guidelines) are the best way to address this problem. Our bottom line message is: be device independent and export your semantics as much as you can, and we provide 5 differents guidelines for that:
  1. Follow general principles of separation of structure/content and presentation
  2. Enable textual presentation of your documents
  3. Provide rich native structural/navigational constructs
  4. Provide atomic semantic markup (non structural/navigation)
  5. Support a key-based (discrete) input model

Definitions related to XML accessibility

Definitions:

DTD: Even though we use the acronym DTD, we don't want people to assume we are only talking about a DTD as defined in XML 1.0 but rather some document or collection of documents which contains all the references for interpreting a document which is encoded in accordance with the usage of some application or community of discourse. Schema or profile might be a better word for our usage.

An XML DTD is accessible if it enables and promotes the creation of accessible documents

A document is accessible if it can be equally understood by its targeted audience regardless of the device used to access it.


References