Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 27 additions & 37 deletions wcag20/sources/techniques/failures/F42.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,59 @@
<!DOCTYPE technique
SYSTEM "../../xmlspec.dtd">
<technique id="F42">
<short-name>Failure of Success Criterion 1.3.1 and 2.1.1 due to using scripting events to emulate links in a way that is not programmatically determinable</short-name>
<short-name>Failure of Success Criterion 1.3.1, 2.1.1, 2.1.3, and 4.1.2 due to emulating links in a way that is neither programmatically determinable nor keyboard accessible</short-name>
<applicability>
<p>HTML and XHTML with Scripting.</p>
<p>HTML and XHTML</p>
</applicability>
<applies-to>
<success-criterion idref="content-structure-separation-programmatic"
relationship="failure"/>
<success-criterion idref="content-structure-separation-programmatic" relationship="failure"/>
<success-criterion idref="keyboard-operation-keyboard-operable" relationship="failure"/>
<success-criterion idref="keyboard-operation-all-funcs" relationship="failure"/>
<!--success-criterion idref="ensure-compat-rsv"/-->
<success-criterion idref="ensure-compat-rsv" relationship="failure"/>
</applies-to>
<description>
<p>This failure occurs when JavaScript event handlers are attached to elements
to ''emulate links''. A control or link created in this manner cannot be tabbed to from the keyboard and does not gain keyboard focus like other controls and/or links.
to emulate links. A link created in this manner cannot be tabbed to from the keyboard and does not gain keyboard focus like other controls and/or links.
If scripting events are used to emulate links, user
agents including assistive technology may not be able to identify the links
in the content as links. They may not be recognized as interactive controls
by assistive technology, or they may be recognized as interactive controls
but still not recognized as links. Such elements do not appear in the links
in the content as links. They may be recognized as interactive controls but still not recognized as links, Such elements do not appear in the links
list generated by user agents or assistive technology.</p>
<p>The <code><![CDATA[<a href>]]></code> and <code><![CDATA[<area>]]></code>
<p><note>It is possible to use the ARIA <att>role</att> attribute to identify an anonymous element as link control for assistive technologies. However, best practice for ARIA calls for <loc href="http://www.w3.org/TR/aria-in-html/#first-rule-of-aria-use">making use of native elements whenever possible</loc>, so the use of the <att>role</att> attribute to identify anonymous elements as links is not recommended.</note></p>
<p>The <el>a</el> and <el>area</el>
elements are intended to mark up links.</p>
<p>Attaching event handlers to elements that are not normally interactive, such
as <code><![CDATA[span]]></code> and <code><![CDATA[div]]></code>, can be quite disorienting to
users. Even if care is taken to provide keyboard access to such elements,
users may have a difficult time discovering that there are interactive
controls in the content or understanding what type of behavior to expect
from them. For example, users may not know which keystrokes are supported by
the script to activate the element. Additionally, these elements do not
generate the same operating system events as interactive elements, so
assistive technology may not be notified when the user activates them.</p>
</description>
<examples>
<eg-group role="failure">
<head>Scripting a <code><![CDATA[<span>]]></code> element</head>
<head>Scripting a <el>span</el> element</head>
<description>
<p>Scripted event handling is added to a <code><![CDATA[span]]></code> element so
<p>Scripted event handling is added to a <el>span</el> element so
that it functions as a link when clicked with a mouse. Assistive
technology does not recognize this element as a link.</p>
</description>
<code role="html401"><![CDATA[
<span onclick="this.location.href='newpage.html'">
<span onclick="location.href='newpage.html'">
Fake link
</span>
]]></code>
</eg-group>
<eg-group role="failure">
<head>Scripting an <code><![CDATA[<img>]]></code> element</head>
<head>Scripting an <el>img</el> element</head>
<description>
<p>Scripted event handling is added to an <code><![CDATA[img]]></code> element so
<p>Scripted event handling is added to an <el>img</el> element so
that it functions as a link when clicked with a mouse. Assistive
technology does not recognize this element as a link.</p>
</description>
<code role="html401"><![CDATA[
<img src="go.gif"
alt="go to the new page"
onclick="this.location.href='newpage.html'">
onclick="location.href='newpage.html'">
]]></code>
</eg-group>
<eg-group role="failure">
<head>Scripting an <code><![CDATA[<img>]]></code> element, with keyboard
<head>Scripting an <el>img</el> element, with keyboard
support</head>
<description>
<p>Scripted event handling is added to an <code><![CDATA[img]]></code> element so
<p>Scripted event handling is added to an <el>img</el> element so
that it functions as a link. In this example, the link functionality
can be invoked with the mouse or via the Enter key if the user agent
includes the element in the tab chain. Nevertheless, the element
Expand Down Expand Up @@ -101,12 +90,12 @@ function doKeyPress(url)
]]></code>
</eg-group>
<eg-group role="failure">
<head>Scripting a <code><![CDATA[<div>]]></code> element</head>
<head>Scripting a <el>div</el> element</head>
<description>
<p>This example uses script to make a <code><![CDATA[div]]></code> element behave
<p>This example uses script to make a <el>div</el> element behave
like a link. Although the author has provided complete keyboard
access and separated the event handlers from the markup to enable
repurposing of the content, the <code><![CDATA[div]]></code> element will not be
repurposing of the content, the <el>div</el> element will not be
recognized as a link by assistive technology.</p>
</description>
<code role="html401"><![CDATA[
Expand Down Expand Up @@ -141,7 +130,7 @@ function changeLocation(objEvent, strLocation)
}
]]></code>
<description>
<p>The markup for the <code><![CDATA[div]]></code> element is:</p>
<p>The markup for the <el>div</el> element is:</p>
</description>
<code role="html401"><![CDATA[
<div id="linklike">
Expand All @@ -164,25 +153,26 @@ View the results of the survey.
</resources>
<related-techniques>
<relatedtech idref="G115"/>
<relatedtech idref="F59"/>
</related-techniques>
<tests>
<procedure>
<olist>
<item>
<p>Check whether there are JavaScript event handlers on an element
that emulates a link.</p>
<p>Check whether there are JavaScript event handlers on an element that emulates a link.</p>
</item>
<item>
<p>Check whether the programmatically determined role of the element
is <emph>link</emph>.</p>
<p>Check whether the programmatically determined role of the element is <emph>link</emph>.</p>
</item>
<item>
<p>Check to see whether the emulated link can be activated using the keyboard.</p>
</item>
</olist>
</procedure>
<expected-results>
<ulist>
<item>
<p>If check #1 is true and check #2 is false, then this failure
condition applies and content fails the Success Criterion.</p>
<p>If checks #1 and #3 are true and check #2 is false, then this failure condition applies and the content fails the Success Criterion.</p>
</item>
</ulist>
</expected-results>
Expand Down
9 changes: 9 additions & 0 deletions wcag20/sources/techniques/failures/F59.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
have any predefined roles. When these generic elements are used to create
user interface controls in HTML the assistive technology may not have the
necessary information to describe and interact with the control. </p>
<p><note>Attaching event handlers to elements that are not normally interactive, such
as <el>span</el> and <el>div</el>, can be disorienting to
users. Even if care is taken to provide keyboard access to such elements,
users may have a difficult time discovering that there are interactive
controls in the content or understanding what type of behavior to expect
from them. For example, users may not know which keystrokes are supported by
the script to activate the element. Additionally, these elements do not
generate the same operating system events as interactive elements, so
assistive technology may not be notified when the user activates them.</note></p>
<p> The W3C Candidate Recommendation "<loc xmlns:xlink="http://www.w3.org/1999/xlink"
href="http://www.w3.org/TR/wai-aria/">Accessible Rich Internet Applications (WAI-ARIA) 1.0</loc>" describes mechanisms to provide the necessary role and state information to create fully accessible user interface controls.</p>
</description>
Expand Down
2 changes: 1 addition & 1 deletion wcag20/sources/techniques/html/H91.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<td rowspan="1" colspan="1">&lt;input type = "password"&gt; </td>
<td rowspan="1" colspan="1"> editable text </td>
<td rowspan="1" colspan="1">&lt;label&gt; element associated with it or 'title' attribute </td>
<td rowspan="1" colspan="1">value is purposefully protected against programmatic review</td>
<td rowspan="1" colspan="1">value is purposefully hidden</td>
<td rowspan="1" colspan="1"/>
</tr>
<tr>
Expand Down