diff --git a/wcag20/sources/techniques/failures/F42.xml b/wcag20/sources/techniques/failures/F42.xml index f6559dfc30..ad1ed1cfe3 100644 --- a/wcag20/sources/techniques/failures/F42.xml +++ b/wcag20/sources/techniques/failures/F42.xml @@ -2,70 +2,59 @@ - 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 + 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 -

HTML and XHTML with Scripting.

+

HTML and XHTML

- + - +

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.

-

The ]]> and ]]> +

It is possible to use the ARIA role attribute to identify an anonymous element as link control for assistive technologies. However, best practice for ARIA calls for making use of native elements whenever possible, so the use of the role attribute to identify anonymous elements as links is not recommended.

+

The a and area elements are intended to mark up links.

-

Attaching event handlers to elements that are not normally interactive, such - as and , 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.

- Scripting a ]]> element + Scripting a span element -

Scripted event handling is added to a element so +

Scripted event handling is added to a span element so that it functions as a link when clicked with a mouse. Assistive technology does not recognize this element as a link.

+ Fake link ]]>
- Scripting an ]]> element + Scripting an img element -

Scripted event handling is added to an element so +

Scripted event handling is added to an img element so that it functions as a link when clicked with a mouse. Assistive technology does not recognize this element as a link.

+ onclick="location.href='newpage.html'"> ]]>
- Scripting an ]]> element, with keyboard + Scripting an img element, with keyboard support -

Scripted event handling is added to an element so +

Scripted event handling is added to an img 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 @@ -101,12 +90,12 @@ function doKeyPress(url) ]]> - Scripting a ]]> element + Scripting a div element -

This example uses script to make a element behave +

This example uses script to make a div 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 element will not be + repurposing of the content, the div element will not be recognized as a link by assistive technology.

-

The markup for the element is:

+

The markup for the div element is:

@@ -164,25 +153,26 @@ View the results of the survey. + -

Check whether there are JavaScript event handlers on an element - that emulates a link.

+

Check whether there are JavaScript event handlers on an element that emulates a link.

-

Check whether the programmatically determined role of the element - is link.

+

Check whether the programmatically determined role of the element is link.

+
+ +

Check to see whether the emulated link can be activated using the keyboard.

-

If check #1 is true and check #2 is false, then this failure - condition applies and content fails the Success Criterion.

+

If checks #1 and #3 are true and check #2 is false, then this failure condition applies and the content fails the Success Criterion.

diff --git a/wcag20/sources/techniques/failures/F59.xml b/wcag20/sources/techniques/failures/F59.xml index 25e91b8249..e41a5d574c 100644 --- a/wcag20/sources/techniques/failures/F59.xml +++ b/wcag20/sources/techniques/failures/F59.xml @@ -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.

+

Attaching event handlers to elements that are not normally interactive, such + as span and div, 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.

The W3C Candidate Recommendation "Accessible Rich Internet Applications (WAI-ARIA) 1.0" describes mechanisms to provide the necessary role and state information to create fully accessible user interface controls.

diff --git a/wcag20/sources/techniques/html/H91.xml b/wcag20/sources/techniques/html/H91.xml index 611ea77f83..bb109e7864 100644 --- a/wcag20/sources/techniques/html/H91.xml +++ b/wcag20/sources/techniques/html/H91.xml @@ -80,7 +80,7 @@ <input type = "password"> editable text <label> element associated with it or 'title' attribute - value is purposefully protected against programmatic review + value is purposefully hidden