Visa Accessibility - Valid Code (PAG-001)
VGAR Page Requirements
Valid Code (PAG-WEB-001)
Write valid HTML or at least well-formed code
Document structure and semantics are important to ensuring assistive technology (AT) properly parses code so it can communicate correct information to users. Using well-formed HTML is the first step towards ensuring the accessibility of a web page or application for AT users.
Requirements
Valid Code (PAG-WEB-001-01)
An automated HTML validation tool does not return any issues related to incomplete start and end tags, improperly nested elements, or duplicate IDs and/or attributes.
Test Procedures
HTML Validator (PAG-WEB-001-01-T)
- Open About the Nu HTML Checker < https://validator.w3.org/nu/about.html > in a new browser window.
- Add these two bookmarklets to your browser bookmarks:
- Check serialized DOM of current page: grabs the serialized DOM of whatever page you’re currently browsing and sends it to the checker
- Check for WCAG 2.0 parsing compliance: filters checker results to just show messages relevant to requirements in the WCAG 2.1 spec
- Run the first bookmarklet in the browser tab containing your target page. It will send the page's DOM to the checker and show the results in a new browser tab.
- Run the second bookmarklet in the browser tab containing the checker results. It will filter the results to show only WCAG parsing errors.
- Examine the filtered results to verify that there are no errors related to:
- Missing start or end tags
- Duplicate attributes
- Improper nesting of elements
Related Content
WCAG Success Criteria
W3C Techniques
- G134: Validating Web Pages
- G192: Fully Conforming to Specifications
- H88: Using HTML According to Spec
- H74: Ensuring that opening and closing tags are used according to specification
- H94: Ensuring that elements do not contain duplicate attributes
- H75: Ensuring that Web pages are well-formed