Skip to main content Skip to Table of Contents
U.S. flag

An official website of the United States government

Section 508 ICT Testing Baseline

24. Parsing

Accessibility Requirements

  • WCAG SC 4.1.1 Parsing – In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features.

Test Method Rationale

This baseline test requires that the content has no errors in element and attribute syntax and provides properly nested start/end tags to avoid errors that prevent user agents from parsing the content reliably. If the content cannot be parsed into a data structure, then different user agents, including assistive technologies, may present it differently or be completely unable to parse it.

Limitations, Assumptions, or Exceptions

  • Note: Start and end tags that are missing a critical character in their formation, such as a closing angle bracket or a mismatched attribute value quotation mark are not complete.
  • Markup is not always available to assistive technologies or to user selectable user agents such as browsers. Software sometimes uses markup languages internally for persistence of the software user interface, in ways where the markup is never available to assistive technology (either directly or through a document object model (DOM)), or to a user agent (such as a browser). In such cases, conformance to this provision would have no impact on accessibility as it can have for web content where it is exposed.
  • As stated in the requirement language, some specifications may allow duplicate IDs. For example some markup languages may allow duplicate IDs, provided that IDs are unique for peer elements under the same parent element.

24.1 Test Procedure for Parsing

Baseline Test ID: 24.1-Parsing

Identify Content

All web pages

Test Instructions

  1. Check that (except where the specifications allow these features): [SC 4.1.1]
    1. elements have complete start and end tags,
    2. elements are nested according to their specifications,
    3. elements do not contain duplicate attributes, and
    4. any IDs are unique.

Test Results

If any of the above checks fail, then Baseline Test 24.1-Parsing fails.

Advisory: Tips for streamlined test processes

While validators can be great tools for catching errors, they may not specify which are only parsing errors or catch all cases where content fails to fully conform to a specification.

WCAG 2.0 Techniques

The following sufficient techniques and/or common failures were considered when developing this test procedure for this baseline requirement:

Contact the ICT Baseline Working Group


Related Projects

The Baseline Alignment for Web is being developed to aid in determining if a test process aligns with the ICT Baseline for Web.