Every Web standardista should be happy to hear that well-formed (X)HTML is a requirement at Level A for the W3C‘s latest draft of the Web Content Accessibility Guidelines (WCAG) 2.0. Success Criteria 4.1.1 says
4.1.1 Parsing: Content implemented using markup languages has elements with complete start and end tags, except as allowed by their specifications, and are nested according to their specifications. (Level A)
This means that you have to follow the rules when writing the markup for your Web site. The possible techniques for meeting this success criteria are:
- G134: Validating Web pages
- Fully conforming to specifications
- Ensuring that Web pages can be parsed by using one of the following techniques:
There is more then one possible technique that would be possible for fulfilling this success criteria. You don’t have to do them all, just one.
One option, as notated in the first technique listed, is that you have valid HTML. You should be able to go to the W3C validator and get the big thumbs up.
Probably the best option, as noted in the second technique listed, is that you write your HTML according to the specification. This is more then just well formed markup. This means you should have meaningful and semantic markup, as specified by the specification.
The final option – the fall back option – is just having well-formed markup, as notated by the last two techniques. You’re HTML tags should properly nest with each other and that every open tag that needs a closed tag has one.
I’m guessing this final option is there for those who don’t want to lose their accessibility conformance because they have an errant miswritten ampersand that shows up somewhere (having worked at a large organization on their web team, this happens often).
I’m good with these options. In the end we are requiring of people that they use well-formed markup, which is a big part of the battle against tag soup.
What do you think?
One accessibility expert wrote in 2006 that…
Even if valid HTML everywhere all the time is unattainable, the fact remains that, in 2006, we have never had more developers who understand the concept and are trying to make it real on their own sites. WCAG 2 undoes a requirement that, were it retained, could be perfectly timed now.
Please share your thoughts.