WCAG 2.0 - Robust

4.1.1 Parsing

WCAG 4.1.1 requires that

  • elements have complete start and end tags,
  • elements are nested according to their specifications,
  • elements do not contain duplicate attributes, and,
  • ID attributes have unique values.

How to test?

The easiest way to check that a web page meets this requirement is to try validating the page's HTML as required by New Zealand Layer requirement NZ 4.1.2. If a page uses all valid markup, you can rest assured that the page also passes this requirement. In other words, if a page meets NZ 4.1.2, it also meets WCAG 4.1.1.

However, the reverse is not always true: If a page does not validate according to a published grammar, it does not necessarily mean that it also fails WCAG 4.1.1. A page with validity errors fails WCAG 4.1.1 only if one or more of those errors is an element without complete start and end tags, an elements that isn't nested according to its specification, an element with duplicate attributes, or an ID attribute whose value isn't unique on the page.

Various tools are available for validating HTML, e.g., the online service at http://validator.w3.org.

4.1.2 Name, Role, Value

Interactive controls such as links and form inputs should be built using the standard elements already provided by HTML, such as <a>, <button>, <label>, <input>, etc.

When these are used properly, an interactive control’s name (e.g., a link’s or button’s text) and role (i.e., is it a button, a link, a checkbox?) can be readily determined by assistive technologies such as screen readers. Similarly, the state and value of the control can be more easily read and manipulated, e.g., the state of a checkbox can be changed from “checked” to “unchecked”.

When the default HTML elements are not used (as is the case with some custom-built widgets and controls), developers must ensure that the name, roll, state, and value of these interactive components are properly exposed and available to browsers and assistive technologies. Otherwise, some users will not know what components they are interacting with or what even interaction is expected of them.

How to test?

Evaluating this standard requires specialist knowledge in HTML.

Last modified: