In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features. (Level A)
User agents, including assistive technology such as screen readers, must be able to accurately interpret content that uses markup languages. If the markup of the content is ambiguous or incorrect, then it may be interpreted differently by different user agents and the content will not be accessible.
The markup should be:
- Separately exposed and available to assistive technologies and accessibility features of software, or to a user-selectable user agent (example markup languages include HTML, ODF and OOXML).
- Complete, with start and end tags for all elements.
- Correctly nested according to element specifications.
- Free of duplicate attributes; any IDs should be unique, except where the specifications allow these features.
Because there are industry standards for the markup languages used on the Web, such as HTML and XHTML, many Web checking tools can automatically verify that Web pages follow standard markup guidelines. This makes it easier to identify and correct potential parsing problems.
Note: Start and end tags that are missing a critical character in their formation, such as a closing angle bracket or a mismatched attribute value quotation mark are not complete.
Note: Software sometimes uses markup languages internally for persistence of the software user interface, in ways where the markup is never available to assistive technology (either directly or through a Document Object Model), or to a user agent (such as a browser). In such cases, conformance to this provision would have no impact on accessibility, as it would have for web content where it is exposed. Examples of such markup languages include XUL, GladeXML, and FXML.
Refer to Understanding SC 4.1.1 for more information (external link to WCAG).
This paragraph appears generically in all checkpoints. Review the General techniques as well as other tabs applicable to your technology. Prioritize the use of technology-specific techniques, and implement the General techniques as needed. You are always required to find, understand and implement accessible code techniques to meet the checkpoint. The documented techniques and supplements are not exhaustive; they illustrate acceptable ways to achieve the spirit of the checkpoint. If numbered, techniques are in order of preference, with recommended techniques listed first. Where used, IBM information that complements the WCAG techniques is indicated as supplemental.
Items in this section represent techniques that are deemed sufficient to address particular conditions for meeting this checkpoint. Ensure you review WCAG Common Failures to avoid development mistakes.
In addition to the General techniques, any item in this section represents a technique or combination of techniques deemed sufficient.
- Meeting G192: Fully conforming to specifications with:
- Meeting G134: Validating Web pages using the following:
The following examples and comments provide additional information beyond that available in the WCAG techniques. Where items supplement existing Web techniques, they are numbered accordingly (e.g., H74).
Note that closing tags for
<hr> are no longer required in HTML5. However, for HTML4, they must be provided for such elements.
<img id="logo" src="mylogo.jpg" alt="My logo"> - incorrect
<img id="logo" src="mylogo.jpg" alt="My logo" /> - correct
Use a valid doctype statement to enable the validating parser to check content against the correct schema. See Recommended list of Doctype declarations
HTML 4 example
There are no specific Mobile Native iOS techniques for this checkpoint. Refer to the General and Web (HTML, ARIA, CSS) techniques sections.
There are no specific Eclipse techniques for this checkpoint (4.1.1). For Eclipse applications that use markup languages, follow the General techniques.
There are no specific Windows-based techniques for this checkpoint (4.1.1). For Windows-based applications that use markup languages, follow the General techniques.
Many links in this checklist reside outside ibm.com at the Web Content Accessibility Guidelines (WCAG) 2.1. W3C Recommendation 05 June 2018: http://www.w3.org/TR/WCAG21/
Copyright © 1994-2019 World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University, Beihang University). All Rights Reserved.
Copyright © 2001, 2019 IBM Corporation