Parsing
Success Criterion 4.1.1 (Level A)
Question
To ensure proper parsing, is website/application code complete, according to specifications, nested correctly, free of duplicate attributes, and are all IDs unique?
Why is this important
Web browsers and assistive technologies read and understand the website using parsing. Bad or broken HTML causes parsing problems and it makes the website not work properly for assistive technology users.
Whom does it benefit?
Example 1:
As a person who is blind, low vision
I want to hear the accurate label of an active element
which has the label located in any part of the page
so that I can understand the purpose of the active element
presented.
Example 2:
As a person who is blind, low vision
I want to hear the count and all the items of a list
so that I can get an idea of how many list items and its
values presented
What should you do?
Authors should ensure to use markup languages in a way that its fully conforms to their specifications, so that user agents may present the content accurately to assistive technology users.
How do you do it?
- Include start and end tags for each HTML element.
- Use unique id’s and do not include duplicate attributes within each HTML element
- Nest all HTML elements according to the specifications, e.g. visually grouped items should be coded as lists.
- Provide HTML attribute values within quotes when attribute values are strings, space separated tokens, commas and integers.
Need technical guidance?
Technical guidance is available for implementing this Success Criterion at the Understanding Success Criterion 4.1.1 - Parsing page.
Additional Resources to help you:
- 4.1.1 - Parsing (Level A) - WUHCAG
- WCAG 2.0 Parsing Criterion is a PITA - Paciellogroup
- Failure of Success Criterion - Example 1 - W3C
- Failure of Success Criterion - Example 2 - W3C
- Experimental Parsing error bookmarklet - Steve Faulkner, Paciellogroup