Test Case sc4.1.1_l1_007: Well-formedness error: duplicate attributes, first one empty

Formal Metadata

Formal Metadata
TitleWell-formedness error: duplicate attributes, first one empty
DescriptionAn XHTML file that is not well-formed because there is an img element that has two alt attributes instead of one. The first alt attribute is empty; the second contains text alternative. It is not clear if the first or the last attribute will take precedence in user agents and assistive technologies. If the first takes precedence, the screen reader will ignore the image; if the second takes precedence, the screen reader may read the text alternative.
CreatorBenToWeb (Christophe.Strobbe@…)
RightsCopyright BenToWeb 2005-2007
LanguageEnglish
Date2005-10-05
Statusvalidated

Technologies and Features

Technologies are markup languages or data formats. If the technology is a markup language, “features” refers to elements and attributes.

XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)

XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)

Feature: img (namespace: http://www.w3.org/1999/xhtml) .

Technical specification: Strictly Conforming Documents .

Test Data

Purpose

This test case is intended to pass because elements have complete start and end tags that are nested according to specifications (even if one element has duplicate attributes).

Test Modes

Three or more accessibility experts.

Test Files

Test file.

TCDL Data

sc4.1.1_l1_007 (XML).

Rules

“Rules” refer to success criteria in WCAG 2.0, checkpoints in WCAG 1.0 and similar requirements.

Primary Rules

The test case passes (line 11, column 87) the following success criterion: http://www.w3.org/TR/2007/WD-WCAG20-20070517/Overview.html#ensure-compat-parses.

The test case passes (line 11, column 94) the following success criterion: http://www.w3.org/TR/2007/WD-WCAG20-20070517/Overview.html#ensure-compat-parses.

Functional Outcome

The document is not well-formed: the image has two alt attributes; the user may not get the correct alternative text.

Technical Comment

XML 1.0, Third Edition: An attribute name MUST NOT appear more than once in the same start-tag or empty-element tag.

If the image cannot be loaded, Internet Explorer 6.0, Firefox 2.0, SeaMonkey 1.1 and Opera 9.0 (all tested on Windows XP) don't display alt text, which probably means that the second alt attribute is ignored by these browsers.

This test case does not map to a WCAG 2.0 technique or failure.

(The error in the test file is not covered by failure F70: Failure of SC 4.1.1 due to incorrect use of start and end tags or attribute markup.)

Secondary Rules

Secondary Rule (WCAG 2.0 - April 2006 Working Draft (Last Call))

The test case passes (line 11, column 87) the following success criterion: http://www.w3.org/TR/2006/WD-WCAG20-20060427/guidelines.html#ensure-compat-parses.

The test case passes (line 11, column 94) the following success criterion: http://www.w3.org/TR/2006/WD-WCAG20-20060427/guidelines.html#ensure-compat-parses.

Functional Outcome

The document is not well-formed: the image has two alt attributes; the user may not get the correct alternative text.

Technical Comment

XML 1.0, Third Edition: An attribute name MUST NOT appear more than once in the same start-tag or empty-element tag.

Online version: sc4.1.1_l1_007.

Secondary Rule (WCAG 2.0 - February 2005 Editor's Draft)

The test case fails the following success criterion at line 11, column 87: http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-20050211/#4.1_use-spec-avoid-spec-no-exception.

The test case fails the following success criterion at line 11, column 94: http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-20050211/#4.1_use-spec-avoid-spec-no-exception.

Functional Outcome

The document is not well-formed: the image has two alt attributes; the use may not get the correct alternative text.

Technical Comment

XML 1.0, Third Edition: An attribute name MUST NOT appear more than once in the same start-tag or empty-element tag.