WCAG 2.0 Test Samples Metadata
- Overview
- All Tests
- Search Tests
- [Submit Tests]
- Metadata Format
- Review Process
Page Contents
Introduction
WCAG 2.0 Test Samples consist of two parts: the actual test sample content that demonstrates correct or incorrect implementation of WCAG 2.0 Techniques; and the metadata that describes the respective test sample. This document provides and overview of the metadata vocabulary that is used to describe the test samples, and the directory structure and naming conventions that are used to store the test samples in the WCAG 2.0 Test Samples Repository.
Metadata Vocabulary
The metadata vocabulary for WCAG 2.0 Test Samples is a subset of the elements defined by the Test Case Description Language (TCDL) 2.0. The following is an exhaustive list of the elements that are used to describe WCAG 2.0 Test Samples. TCDL 2.0 elements that are not listed here are not used in this WCAG 2.0 Test Samples Repository.
Note: the metadata vocabulary for the WCAG 2.0 Test Samples is used in conformance with TCDL 2.0; please refer to the specification for a normative definition of the language. Additional requirements and restrictions on TCDL 2.0 elements are indicated below and only apply to WCAG 2.0 Test Samples. An [example metadata file] for WCAG 2.0 Test Samples demonstrates the usage of these elements.
testCaseDescription- required- attribute
id- required; see naming conventions formalMetadata- requiredtitle- requireddc:creator- required
Restriction: the value of this element is predefined for WCAG 2.0 Test Samples, refer to the [metadata template] for the actual constant value.dc:language- requireddc:rights- required
Restriction: the value of this element is predefined for WCAG 2.0 Test Samples, refer to the [metadata template] for the actual constant value.dc:date- required
Restriction: the value of this element must reflect the last modified date of the WCAG 2.0 Test Sample, this is done by using the CVS command $Date$.status- required
Restriction: the status of WCAG 2.0 Test Samples must be in accordance with Conformance Test Process For WCAG 2.0.version- required
Restriction: the versioning of WCAG 2.0 Test Samples is done by using the CVS command $Revision$.
technologies- requiredtechnicalSpec- required
Note: at the present time, the WCAG Working Group is continuing to refine its concept for Accessibility Supported Technologies (previously Baseline); the usage of this element may change accordingly.- attribute
handle- required - attribute
mediatype- if a MIME media type is available specName- requiredtestElements- optional
Note: at the present time, the usage of this element is still under discussion and dependent on the WCAG Working Group refinement of the concept for Accessibility-Supported Technology (formerly Baseline).testElement- required- attribute
baseline- optional elementName - required- attribute
xml:lang- optional - attribute
dir- optional - attribute
localname- required - attribute
namespace- optional
- attribute
specReference - optional- attribute
xml:lang- optional - attribute
dir- optional - attribute
xlink:href- optional
- attribute
specQuote- optional- attribute
xml:lang- optional - attribute
dir- optional
- attribute
- attribute
- attribute
testCase- requireddc:description- requiredpurpose- requiredinternalNotes- optionalinternalNote- required
expertGuidance- optional
Restriction: this element is to provide additional information about executing the WCAG 2.0 Test Sample (including the description of client-side user input that a test sample may depend on), it shall not be used to interpret WCAG 2.0 Techniques.preconditions- optionalfiles- requiredfile- required, containing one of the following:http:GetRequest- optionalhttp:PostRequest- optionalhttp:PutRequest- optionalhttp:HeadRequest- optional
rules- requiredrule- required- attribute
xlink:href- required
Note: this is the ID for the specific version of the WCAG 2.0 document. These IDs are defined by the Rule Sets XML document, which is a companion to BenToWeb's TCDL 2.0. locations- optional- attribute
expectedResult- required location- optional
Note: this element contains location pointers as defined by [Evaluation and Report Language (EARL) 1.0 location pointers]. ERT WG is still developing the syntax for these location pointers in the draft document [Pointer Methods in RDF]. The content of this TCDL may therefore change to synchronize with EARL 1.0 until it is finalized.
Note: Until EARL location pointers allow one to specify the XPath version used, XPath expressions in location pointers are assumed to be XPath 2.0 expressions. Also,locationreferences generated code whenever possible (including code generated by client-side script).- attribute
techrefs- required
- attribute
- attribute
techniques- required
Restriction: Each WCAG 2.0 Test Sample links to exactly one WCAG 2.0 technique or failure.technique- required- attribute
id- required
Restriction: use the same identifiers as in Techniques for WCAG 2.0. - attribute
xlink:href- required
- attribute
techComment- optional
Note: the author of the test sample can also use this element to record issues with WCAG 2.0 success criteria, techniques or failures that were encountered before submission to the task force.
- attribute
namespaceMappings- optional (required if thelocationelements use XPath statements with namespaces)namespace- requirednsPrefix- requirednsURI- required
- attribute
Directory Structure
WCAG 2.0 Test Samples are organized by their primary technology such as XHTML, SVG, and so on. Within each technology directory, there are two sub-directories: "metadata" for the metadata, and "testfiles" for the actual test sample content. Both types of files are named according to the naming conventions described in the next section of this document. In addition to test files, the sub-directory with the test sample content contains a "resources" directory, which may contain further sub-directories with auxiliary content such as images, audio tracks, scripts, and so on. The directory structure of the WCAG 2.0 Test Samples Repository looks as follows:
xhtmlmetadatatestfilesresourcesappletsaudioflashimagesscriptsvideo- more resource sub-directories as needed
- more technology directories as needed
Naming Conventions
The files containing the actual test sample content and the metadata for WCAG 2.0 Test Samples follow a naming convention. The name of the files is a combination of the WCAG 2.0 Success Criterion that they address and a sequential number. The format of these filenames is xxx_nnn.type and consists of the following parts:
xxx- This first part of the filename represents the WCAG 2.0 Success Criterion which the test sample addresses, for example
text-equiv-all. nnn- A sequential number is assigned to each filename based on the order in which the test samples are committed to the repository. The first test sample receives the number
001. See also below for test samples with multiple test files. type- Finally, the file type is also indicated in the filename. The files containing the test sample content have file types that represent the primary technology such as
html,svg, and so on; the metadata files have the file typexml.
Supporting files (CSS, JavaScript, images, audio, etcetera) also use this naming convention.
Example: the filename text-equiv-all_001.html represents the first HTML test sample for the WCAG 2.0 Success Criterion 1.1.1 (which currently has the identifier "text-equiv-all"). The metadata for this test sample has the filename text-equiv-all_001.xml and is stored in a separate directory as described in the section directory structure.
If a test sample uses more than one test file, another underscore and numeric identifier (usually two digits) are added after the nnn.
Example: the test sample with identifier consistent-behavior-consistent-locations_001 uses three test files with the following names: consistent-behavior-consistent-locations_001_01.html, consistent-behavior-consistent-locations_001_02.html and consistent-behavior-consistent-locations_001_03.html.
Note: the filename without the file type, for example consistent-behavior-consistent-locations_001, is a unique identification of the WCAG 2.0 Test Sample. This ID is reused in the id attribute of the testCaseDescription element of the metadata file.
Test Sample Content Files
In addition to the naming convention, test sample content files meet each of the following requirements, except when the purpose of the test sample implies a failure of one of these requirements:
- files are syntactically correct and valid (HTML, XHTML, SVG, CSS, etcetera can be validated);
- hyperlinks work;
- links to supporting files (images, client-side scripts, stylesheets, etcetera) work;
- stylesheets and client-side scripts are in separate files (which means that they are also separate from the content file that uses them).
Related Resources
WCAG 2.0 Test Samples Resources
- [Example Metadata File]
- Metadata template
- WCAG 2.0 Test Samples Repository
- [WCAG 2.0 Test Samples Submission Form]
- WCAG 2.0 Test Samples Development Task Force
TCDL 2.0 Resources
- BenToWeb Project
- Test Case Description Language (TCDL) 2.0
- Rule Sets XML for TCDL 2.0, HTML version of Rule Sets XML for TCDL 2.0
Translations