Parsing
Success Criterion 4.1.1 (Level A)

Question

To ensure proper parsing, is your site or application code complete and schematically correct according to specifications? For example: are elements nested correctly, free of duplicate attributes, attributes are properly used, and are all IDs unique?

Why is this important

“Parsing” is how software like a web browser and/or assistive technology read and understand a website or application. It is important that the different technologies used to view a site or application don’t have trouble parsing the code. All users will benefit from a site or application built on clean and complete HTML because it will work properly in all web browsers and on all kinds of devices, from computers to tablets to smartphones.

Users who rely on assistive technology will benefit from a properly coded website or application as the technology often relies on HTML parsing. Bad or broken HTML is more likely to cause parsing problems for assistive technology.

Whom does it benefit?

Example 1:

As a person who is blind and uses a screen reader,
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 there are, and their values presented.

Example 2:

As a person who is blind and uses a screen reader,
I want table column and row headings to be coded using the correct scopes and unique IDs
so that I can clearly distinguish which heading of a table row or column matches the table cell I am currently in.

What should you do?

Web standards and technologies evolve quickly. Designers and developers should stay up to speed on HTML and other coding specifications to ensure they are using proper and complete code.

When coding web sites or applications, use code that is complete. For example: complete start and end tags, elements that are nested properly and do not contain duplicate attributes, use IDs that are unique, etc.

How do you do it?

  • Include start and end tags for each HTML element.
  • Use unique IDs, 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: