1. Home
  2. :
  3. WCAG Guidelines
  4. :
  5. 4.1.1 Parsing – Level A
  6. :
  7. Is all the HTML produced...

Is all the HTML produced semantic and valid according to HTML and ARIA validators?

Goal

Ensure that the technology that reads our web markup can parse it and confirm that it’s valid.

Why this matters

If the code is invalid, it’s likely to produce unexpected results. For example, the web archive for a page on the Sewing and Embroidery Warehouse site shows that if you don’t close your header tags, they can multiply in size instead of displaying at the intended size.

A little closer to home, I’ve seen paragraph tags embedded in paragraph tags (no), links inside of link (also no), tags closed out-of-order (nope) and any number of any other “whoops” scenarios cause both semantic and visual defects for users.

We validate our markup for the same reason that we run spellcheckers and ensure our code compiles before pushing it to production: if we can catch mistakes before they happen, they’re cheaper, faster, and much less embarrassing to fix.

How to implement

How to test

Once you have the validator of your choice, run it against the markup and determine what is and isn’t validating correctly. Then, either correct the issues or find someone in your organization that should correct the issues. (It’s always polite to contact them first to prevent opening duplicate issues.)