While developing a web page, it is possible to make mistakes. Similar to any programming language, the HTML markup also need to be validated to have a clean and semantic code.
The interesting part is not all the markup defects need to be fixed to meet WCAG compliance though it is good to fix all. The four defect types that need to be addressed as per WCAG 2.0 4.1.1 Parsing are
a. Duplicate Id values
b. Duplicate attributes for elements.
c. Improper opening and closing of elements
d. Nesting elements according to specifications.
For validating this requirement, we can use the W3c NU validation service and the Steve Falkner book marklet. This is the simplest way of identifying all the four defects at once. Though it is a simple way in certain situations this may also be complex. This may not be always accurate too, because the bookmarklet works on the keyword searching principle.
The other reason is because the new validation service is still in experiment stage.
Validation of parsing
- Navigate to the New W3c validation service https://validator.w3.org/nu/NU.
- Choose the preferred input method i.e. URL, File upload or Code input methods.
- Provide the input depending on the selection from step 2.
- Hit the validate button.
- Once the validation results are populated activate the parsing book marklet from the bookmarks.
Note that the defects listed may also contain some other accessibility issues such as missing labels for form elements, missing alternate text for images etc.
Note: Other automation tools like aXe can identify the presence of duplicate Id values.
WCAG Success Criteria
4.1.1 parsing (Level A)