W3C logoWeb Accessibility Initiative (WAI) logo

WAI: Strategies, guidelines, resources to make the Web accessible to people with disabilities

WCAG 2.0 Test Samples Metadata

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.

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:

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 type xml.

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:

Related Resources

WCAG 2.0 Test Samples Resources

TCDL 2.0 Resources

WCAG 2.0 Resources

Other Useful Resources