1EdTech Guidelines for Developing
Accessible Learning Applications
version 1.0 white paper
| WGBH | NCAM | SALT PROJECT | 1EdTech Consortium |
4. Using XML for Accessibility
As mentioned in Section 3, XML can facilitate accessibility through transformable, structured, text-based content. XML allows a range of flexible stylesheet transformations. It allows simple changes to font size and color as well as the use of complex translation grammars used to translate a presentation into entirely different modalities. Because all content in an XML document is declared and labeled, authors can create content that later can be re-styled in ways that the author never imagined.
4.1 XML is Customizable and Flexible
XML is the W3C recommended metalanguage for the web. Using XML, authors can develop content that is controlled by languages of their choice and even of their own making. For the purposes of these Guidelines, authors are advised to use XML-based languages in preference to plain HTML. In addition, they should seek to confine their selection of special-purpose XML languages to those already in general use, especially those languages designed with accessibility provisions.
XML has significantly fewer limitations than HTML. While the tags and attributes within HTML are restricted to a pre-defined set, XML offers expert developers the capability to employ author-defined tags. This flexibility makes XML more fully customizable.
Headers and paragraph tags can be made more descriptive. Instead of the standard header and paragraph tags found in HTML, XML allows the developer to define tags, making them more intelligent and intelligible. Thus it is possible for an author to tailor data files to meaningfully describe the type of data in any particular set of tags in a data file.
This flexibility also allows the author to mark up data files with tags that clearly differentiate content intended for different users with different needs. For example, a single data file can contain content designed both for blind or visually impaired users and sighted users. Section 4.2.2 provides an example of how this can be achieved using XML and stylesheets. These flexible tags also support the editing process by permitting authors to use a different 'editing' view than they intend to display for their readers. A visually impaired author, for example, could use a large print view but publish in a smaller print.
Another important difference between HTML and XML lies in the way that the two languages handle the structure and display of data. HTML combines structure and display data. XML separates structure information from display information. The XML metalanguage can create languages that describe and manage the structure of data or that format data. The semantics of an XML document are, therefore, defined by the applications that process them and/or by stylesheets (Extensible Stylesheet Language Transformations, XSLT). Stylesheets render the content of the XML file appropriately for differing output formats.
4.2 XML Allows for Standardization for Accessibility, Validation and Well-formedness
XML-based mark-up languages, including those created by authors, depend upon online DTDs or schemas that provide rules for their interpretation. This means that the tags, including those in XHTML, must be well formed and validated. This additional strictness, not required by HTML, imposes a discipline on content developers but it is not burdensome. There are code validators available from W3C and both the content files and the associated stylesheets can be validated for correct code. As described in the principles on standards, validity and well-formedness generally contribute to accessibility.
Resource:
- For information on accessible use of XML, consult the XML resources from the W3C.
4.3 Recommended XML-Based Languages
The following section considers some of the XML-based languages used in online education.
4.3.1 XHTML
XHTML offers persuasive advantages over HTML for the production of accessible online media.
Well-formed HTML can be translated easily into XHTML, which then refers the user agent to standardized, online interpretation specifications. Developers need not fear that XHTML will cause compatibility problems with older browsers. XHTML will default to HTML when it encounters non-XHTML browsers. This back-up feature comes at a small cost to the author but it offers important support for user agents that are designed to increase accessibility using XML.
To use XHTML is to use a mark-up language that is future-proofed. Developers do not have to make significant changes to existing resources and activities; they need only follow the rules for producing correct HTML 4.1 and then add an extra line to their resource that identifies it as being accessible to XML-using agents. This added line also includes instructions for finding online, machine-readable information for interpreting the XML version in use. XHTML is particularly useful to user agents that have work to do: to find alternative resources, to synchronize files such as caption and video files, or to transform the content in some way to make it more accessible.
4.3.2 XML Mark-up and Stylesheets
Cascading Stylesheets (CSS), as used with HTML are able to alter the display and formatting of all or part of the contents of the HTML file to which they apply. Thus, for example, <H1> tags in the HTML file can be designed to appear as bold, 15 point and blue. But a different CSS can instead render them as 30 point for a low-vision learner. CSS are, however, capable of altering the formatting and display of selected aspects of the entire contents of the HTML file. The browser will display the whole HTML file to every user.
Extensible Stylesheet Language Transformations (XSLT) are a more powerful tool. They allow the selection and formatting of particular parts of an XML file. They also allow the addition (within the XSLT file itself) of other elements such as images, text or video not included in the default presentation. Thus, authors need only write data files once but can specify a variety of presentations to suit different needs. For example, using HTML to create multi-language web sites requires separate files for each language for each page. XSLTs allow the stylesheet to select each language's text from the contents of a single file for the page and display it together with any language-specific images, audio or video.
Besides handling multiple languages, XML can be used to differentiate content that is intended for a variety of users including blind learners, visually impaired learners, and sighted learners, all within a single data file.
Here is an example from a biological sciences course:
<A_robustus_intro> <audio description> This page contains information relating to the fossils of Australopithecus robustus. It shows an image of a skull specimen discovered in 1950 by Robert Broom showing a slight sagittal crest and large zygomatic arches that project forwards, hiding the sunken nasal area. </audio description> <large print> The above image shows the skull of Australopithecus robustus, discovered in 1950 by Robert Broom. Look at the distinctive features and note them. </large print> <standard> The above image shows the skull of Australopithecus robustus, discovered in 1950 by Robert Broom. Look at the distinctive features and note them. </standard> </A_robustus_intro>
The various versions about A. Robustus can be added to the learner's view of the lesson via XSLT, perhaps in response to a preference setting where the user can indicate the need for large print and/or audio description. This brief example illustrates the capacity of XML to include author-tailored tags that increase both the flexibility and readability of the file.
4.3.3 Scalable Vector Graphics (SVG)
Scalable Vector Graphics language (SVG) is a vector graphics language recommended and supported by W3C, and is thus used by many of the W3C member companies who develop relevant authoring and user agent software. Vector graphics differ from raster graphics. Raster, or bit-mapped graphics store images as a simple collection of bits, making manipulation of those images difficult. Vector graphics, however, define images descriptively. For example, a vector image of a cube is defined by a mathematical description of its shape. In that way, the cube can be enlarged, reduced or rotated on screen. The description of the object can be interpreted by other output devices, such as a haptic display. In the case of technical drawings, the displayed image is often derived from a database of information. That information can be reproduced graphically, but also as a table or even represented by sound.
The data that defines a vector image can also include a detailed description of the data itself. Thus both the ALT text and the LONGDESC can be part of the 'image' object. In addition, SVG supports Meta-data about the object so that an image object can point to an alternative description of the object located elsewhere.
Anywhere images are constructed from other image elements, the individual objects retain their own descriptions. In an engineering diagram, for example, items included in a flowchart can each be described separately. In this way, the content producer is able to group sets of objects to create a more complex graphical object. If the graphical elements can be described and their relationship described, then even the user who cannot use a graphical interface still has a good chance of being able to decode the image.
Authors need to work carefully with the power of SVG. Complex images can contain many sub-elements and thus accumulate a large number of descriptions associated with the entire image. Authors should organize sub-element information hierarchically so that a user who cannot see the entire image can listen to or read the text, and still be able to create a suitable mental model of the image.
SVG provides a format for images that supports a number of accessibility features. These features include:
- text information for blind or low-vision users.
- scalability that allows high quality zoom functionality. Lines stay sharp when magnified.
- labels on objects. If the objects are also grouped into a hierarchy, the hierarchical relationship between labels will convey more fine-grained detail than a single text description.
- support for stylesheets, DOM2 for customizing presentation and Meta-data as well as RDF for efficient cataloguing.
- support for device-independent events allowing ATs and other input devices.
Resources:
- The W3C website offers information about SVG and SVG accessibility.
- Also see the W3C's Accessibility Features of SVG.
4.3.4 Synchronized Multimedia Integration Language (SMIL)
Synchronized Multimedia Integration Language (SMIL) is another XML language. SMIL, pronounced "smile", is recommended for the creation of multimedia presentations for the web and is supported by popular user agents including RealPlayer and QuickTime Media Player.
Many of the solutions to problems discussed in these Guidelines require the author to provide equivalent alternative formats such as text, sounds, or haptics alongside graphics. The integration and synchronization of these elements can be managed by SMIL. Throughout the text of these guidelines, there is reference to SMIL and there are some examples that show how it can be used, where appropriate.
Resources:
- For information on accessibility features of SMIL, see the W3C's Accessibility Features of SMIL
- MAGpie (Media Access Generator), an authoring tool which can be used to author accessible SMIL presentations, is available from the National Center for Accessible Media
4.3.5 XML E-Book Formats
Two major e-book formats are XML based: the Digital Audio-based Information System (DAISY) and the Open eBook Publication Structure.
DAISY's mission is to develop international standard and implementation strategies for the production, exchange and use of Digital Talking-Books in both developed and developing countries. To ensure access to information for people with print disabilities, DAISY is designed to enhance integration with mainstream technology.
More information is available on the DAISY website.
The purpose of the Open eBook Publication Structure is to provide a specification for representing the content of electronic books. Specifically:
- the specification is intended to give content providers (e.g. publishers, and others who have content to be displayed) and tool providers minimal and common guidelines that ensure fidelity, accuracy, accessibility, and presentation of electronic content across various electronic book platforms.
- the specification seeks to reflect established content format standards.
- the goal of this specification is to provide the purveyors of electronic-book content (publishers, agents, authors et al.) a format for use in providing content to multiple reading systems.
The Open eBook Publication Structure is based on the premise that in order for electronic-book technology to achieve widespread success in the marketplace, reading systems must have convenient access to a large number of titles across a variety of genres. The specification therefore is based on HTML and XML, the same core languages that define the World Wide Web, and is designed to allow publishers and authors to deliver their material in a single format. This information and more is available from the Open eBook website.
4.3.6 Other Markup Languages
MathML, ChemML, MusicML and others are discussed in Section 11 Guidelines for Topic Specific Access. These are markup languages, developed in XML format, and they can be mixed and matched with XHTML.