Parsing
Guideline
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.
Intent
The intent of this regulation is to ensure that user agents, including assistive technologies, can accurately interpret and parse content. If the content cannot be parsed into a data structure, then different user agents may present it differently or be completely unable to parse it. Some user agents use "repair techniques" to render poorly coded content.
Since repair techniques vary among user agents, authors cannot assume that content will be accurately parsed into a data structure or that it will be rendered correctly by specialized user agents, including assistive technologies, unless the content is created according to the rules defined in the formal grammar for that technology. In markup languages, errors in element and attribute syntax and failure to provide properly nested start/end tags lead to errors that prevent user agents from parsing the content reliably. Therefore, this requirement requires that the content can be parsed using only the rules of the formal grammar.
Finding Applicable Components
Load each page or document into a validating parser, such as the W3C Markup Validation Service.
Inspecting and Using Components
- Load each page or document into a validating parser.
- Check that no validation errors are found.
- Analyze the page with the DeQue Attest browser extension and verify that no duplicate ID attribute values are present.
Section 508/WCAG 2.0 Failure Conditions
- Validation errors are present due to improperly closed HTML, XML, or SVG tags.
- Fails 4.1.1 Parsing.
- Duplicate ID attribute values are present on the same page.
- Fails 4.1.1 Parsing.
Reporting Test Results
There are no applicable baseline test results for this requirement.
See Also |