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)

  1. Open About the Nu HTML Checker < https://validator.w3.org/nu/about.html > in a new browser window.
  2. Add these two bookmarklets to your browser bookmarks:
    1. Check serialized DOM of current page: grabs the serialized DOM of whatever page you’re currently browsing and sends it to the checker
    2. Check for WCAG 2.0 parsing compliance: filters checker results to just show messages relevant to requirements in the WCAG 2.1 spec
  3. 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.
  4. Run the second bookmarklet in the browser tab containing the checker results. It will filter the results to show only WCAG parsing errors.
  5. Examine the filtered results to verify that there are no errors related to:
    1. Missing start or end tags
    2. Duplicate attributes
    3. Improper nesting of elements

Related Content

WCAG Success Criteria

W3C Techniques

Common Failures