id
attributes are unique on a Web pageSee Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.0 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.0.
All HTML pages
This technique relates to:
Note: This technique must be combined with other techniques to meet SC 4.1.1. See Understanding SC 4.1.1 for details.
The objective of this technique is to avoid key errors that are known
to cause problems for assistive technologies when they are trying to
parse content that has the same id
attribute on different elements.
These errors can be avoided by making sure the Web page does not have
duplicate id
values. This can be done manually or by using HTML's mechanism
to specify the technology and technology version, and validating the
document for this condition. There are several validators that the
developer can use; validation reports generally mention this type of
error. The document type declaration is not strictly necessary for
this type of evaluation, but specifying the document type declaration
makes it easier to use a validator.
HTML pages include a document type declaration (sometimes referred to as !DOCTYPE statement). The developer can use offline or online validators (see Resources below) to check that id attributes values are only used once on a page. The W3C validador, for example, will report ID "X already defined" when it encounters the second use of an id value.
Resources are for information purposes only, no endorsement implied.
For other resources, see G134: Validating Web pages.
Check that all id attribute values are unique on the web page.
Check 1 is true.
If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.