Using aria-alertdialog to Identify Errors
+This example shows how role="alertdialog" can be used to notify someone they have entered invalid information.
+ +diff --git a/.editorconfig b/.editorconfig
index e20a9680d2..b3b073edc9 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,4 +8,3 @@ indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
-trim_trailing_whitespace = true
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 4174dade24..7555ccf313 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,4 @@
-language: node_js
+language: java
env:
global:
- GH_REF: github.com/w3c/wcag.git
@@ -15,20 +15,15 @@ before_script:
- git config --global user.name "michael-n-cooper"
script:
- - cd ../..
- - mkdir gh-pages
- - cd gh-pages
- - git clone --depth=1 --branch=gh-pages https://github.com/w3c/wcag.git
- - cd wcag
- - mkdir guidelines/22
- - mkdir requirements/22
- - cp -r ../../w3c/wcag/css css
- - cp ../../w3c/wcag/guidelines/guidelines.css guidelines/22/guidelines.css
- - cp ../../w3c/wcag/guidelines/relative-luminance.xml guidelines/22/relative-luminance.xml
- - curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://rawgit.com/w3c/wcag/master/requirements/index.html -o requirements/22/index.html -f --retry 3
- - curl https://labs.w3.org/spec-generator/?type=respec"&"url=https://rawgit.com/w3c/wcag/master/guidelines/index.html -o guidelines/22/index.html -f --retry 3
+ - mkdir output
+ - git clone --depth=1 --branch=gh-pages https://github.com/w3c/wcag.git output
+ - ant deploy
-after_success:
- - git add -A .
- - git commit -m "Generated by TRAVIS-CI"
- - git push "https://${GH_TOKEN}@${GH_REF}" gh-pages > /dev/null 2>&1
+deploy:
+ provider: pages
+ skip-cleanup: true
+ github-token: $GITHUB_TOKEN
+ keep-history: true
+ local-dir: output
+ on:
+ branch: master
diff --git a/README.md b/README.md
index 71f3e8f047..24c8c4e411 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Where ` element, containing a relative link to `../../working-examples/{example-name}/`.
+
+Cross references to other techniques may be provided where useful. Generally they should be provided in the "Related Techniques" section but can be provided elsewhere. Use a relative link to reference the technique, `{Technique ID}` if the same technology, or `../{Technology}/{Technique ID}` otherwise. If the technique is still under development and does not have a formal ID, reference the path to the development file. If the technique is under development in a different branch, use an absolute URI to the rawgit version of the technique.
+
+Cross references to guidelines and success criteria should use a relative URI to the *Understanding* page for that item. Cross references to other parts of the guidelines should use an absolute URI to the guidelines as published on the W3C TR page, a URI beginning with `https://www.w3.org/TR/WCAG21/#`. Note that references to guidelines or success criteria to which techniques relate are added by the generator upon publication based on information in the Understanding documents, so redundant links to those is not normally needed or advised.
### Create Techniques
+[General priorities and process to work on techniques are maintained in the wiki](https://www.w3.org/WAI/GL/wiki/Wcag21-techniques).
+
+New techniques should use a filename that is derived from a shortened version of the technique title. Editors will assign the technique an ID and rename the file when it is accepted by the Working Group. For example, a technique "Using the alt attribute on the img element to provide short text alternatives" might use "img-alt-short-text-alternatives.html" as the filename. The editors will assign it a formal ID, and rename the file, when it is accepted by the Working Group.
+
+Each new technique should be created in a new branch. Set-up of the branch and file is automated via the create-techniques.sh script, which can be run with bash. The command line is:
+
+```Shell
+bash create-techniques.sh $1 $3 The WCAG 2.0 document is designed to meet the needs of those who need a stable, referenceable technical standard. Other documents, called supporting documents, are based on the WCAG 2.1 document and address other important purposes, including the ability to be updated to describe how WCAG would be applied with new technologies. Supporting documents include: The WCAG 2.1 document is designed to meet the needs of those who need a stable, referenceable technical standard. Other documents, called supporting documents, are based on the WCAG 2.1 document and address other important purposes, including the ability to be updated to describe how WCAG would be applied with new technologies. Supporting documents include: How to Meet WCAG 2.1 - A customizable quick reference to WCAG 2.1 that includes all of the guidelines, success criteria, and techniques for authors to use as they are developing and evaluating Web content. This includes content from WCAG 2.0 and WCAG 2.1 and can be filtered in many ways to help authors focus on relevant content. WCAG 2.1 meets a set of requirements for WCAG 2.1 which, in turn, inherit requirements from WCAG 2.0. Requirements structure the overall framework of guidelines and ensure backwards compatibility. The Working Group also used a less formal set of acceptance criteria for success criteria, to help ensure success criteria are similar in style and quality to those in WCAG 2.0. These requirements constrained what could be included in WCAG 2.1. This constraint was important to preserve its nature as a dot-release of WCAG 2. WCAG 2.1 meets a set of requirements for WCAG 2.1 which, in turn, inherit requirements from WCAG 2.0. Requirements structure the overall framework of guidelines and ensure backwards compatibility. The Working Group also used a less formal set of acceptance criteria for success criteria, to help ensure success criteria are similar in style and quality to those in WCAG 2.0. These requirements constrained what could be included in WCAG 2.1. This constraint was important to preserve its nature as a dot-release of WCAG 2. In order to avoid confusion for implementers for whom backwards compatibility to WCAG 2.0 is important, new success criteria in WCAG 2.1 have been appended to the end of the set of success criteria within their guideline. This avoids the need to change the section number of success criteria from WCAG 2.0, which would be caused by inserting new success critera between existing success ccriteria in the guideline, but it means success criteria in each guideline are no longer grouped by conformance level. The order of success criteria within each guideline does not imply information about conformance level; only the conformance level indicator (A / AA / AAA) on the success criterion itself indicates this. The WCAG 2.1 Quick Reference provides ways to view success criteria grouped by conformance level, along with many other filter and sort options. In order to avoid confusion for implementers for whom backwards compatibility to WCAG 2.0 is important, new success criteria in WCAG 2.1 have been appended to the end of the set of success criteria within their guideline. This avoids the need to change the section number of success criteria from WCAG 2.0, which would be caused by inserting new success criteria between existing success criteria in the guideline, but it means success criteria in each guideline are no longer grouped by conformance level. The order of success criteria within each guideline does not imply information about conformance level; only the conformance level indicator (A / AA / AAA) on the success criterion itself indicates this. The WCAG 2.1 Quick Reference provides ways to view success criteria grouped by conformance level, along with many other filter and sort options. Content must be robust enough that it can be interpreted by by a wide variety of user agents, including assistive technologies. Content must be robust enough that it can be interpreted by a wide variety of user agents, including assistive technologies. This section lists requirements for conformance to WCAG 2.1. It also gives information about how to make conformance claims, which are optional. Finally, it describes what it means to be accessibility supported, since only accessibility-supported ways of using technologies can be relied upon for conformance. Understanding Conformance includes further explanation of the accessibility-supported concept. This section lists requirements for conformance to WCAG 2.1. It also gives information about how to make conformance claims, which are optional. Finally, it describes what it means to be accessibility supported, since only accessibility-supported ways of using technologies can be relied upon for conformance. Understanding Conformance includes further explanation of the accessibility-supported concept. Conformance (and conformance level) is for full Web page(s) only, and cannot be achieved if part of a Web page is excluded. For the purpose of determining conformance, alternatives to part of a page's content are considered part of the page when the alternatives can be obtained directly from the page, e.g., a long description or an alternative presentation of a video. Authors of Web pages that cannot conform due to content outside of the author's control may consider a Statement of Partial Conformance. New A full page includes each variation of the page that is automatically presented by the page for various screen sizes (e.g. variations in a responsive Web page). Each of these variations needs to conform (or needs to have a conforming alternate version) in order for the entire page to conform. A full page includes each variation of the page that is automatically presented by the page for various screen sizes (e.g. variations in a responsive Web page). Each of these variations needs to conform (or needs to have a conforming alternate version) in order for the entire page to conform. Only accessibility-supported ways of using technologies are relied upon to satisfy the success criteria. Any information or functionality that is provided in a way that is not accessibility supported is also available in a way that is accessibility supported. (See Understanding accessibility support.) Only accessibility-supported ways of using technologies are relied upon to satisfy the success criteria. Any information or functionality that is provided in a way that is not accessibility supported is also available in a way that is accessibility supported. (See Understanding accessibility support.) If a page cannot conform (for example, a conformance test page or an example page), it cannot be included in the scope of conformance or in a conformance claim. For more information, including examples, see Understanding Conformance Requirements. For more information, including examples, see Understanding Conformance Requirements. Conformance claims are not required. Authors can conform to WCAG 2.1 without making a claim. However, if a conformance claim is made, then the conformance claim must include the following information: A concise description of the Web pages, such as a list of URIs for which the claim is made, including whether subdomains are included in the claim. Refer to Understanding Conformance Claims for more information and example conformance claims. Refer to Understanding Metadata for more information about the use of metadata in conformance claims. Refer to Understanding Conformance Claims for more information and example conformance claims. Refer to Understanding Metadata for more information about the use of metadata in conformance claims. This section shows changes proposed for WCAG 2.1 since its publication as a W3C Recommendation. These changes are also recorded as errata. The full commit history to WCAG 2.1 is available. The full commit history to WCAG 2.1 is available. No changes have been made to date. Note 2: Almost all systems used today to view Web content assume sRGB encoding. Unless it is known that another color space will be used to process and display the content, authors should evaluate using sRGB colorspace. If using other color spaces, see Understanding Success Criterion 1.4.3. Note 2: Almost all systems used today to view Web content assume sRGB encoding. Unless it is known that another color space will be used to process and display the content, authors should evaluate using sRGB colorspace. If using other color spaces, see Understanding Success Criterion 1.4.3. Note 3: If dithering occurs after delivery, then the source color value is used. For colors that are dithered at the source, the average values of the colors that are dithered should be used (average R, average G, and average B). Note 4: Tools are available that automatically do the calculations when testing contrast and flash. Except for parts of the content which require two-dimensional layout for usage or meaning. Note: 320 CSS pixels is equivalent to a starting viewport width of 1280 CSS pixels wide at 400% zoom. For web content which are designed to scroll horizontally (e.g. with vertical text), the 256 CSS pixels is equivalent to a starting viewport height of 1024px at 400% zoom. 320 CSS pixels is equivalent to a starting viewport width of 1280 CSS pixels wide at 400% zoom. For web content which are designed to scroll horizontally (e.g. with vertical text), the 256 CSS pixels is equivalent to a starting viewport height of 1024px at 400% zoom. Examples of content which require two-dimensional layout are images, maps, diagrams,
video, games, presentations, data tables, and interfaces where it is necessary to keep toolbars in view while
diff --git a/guidelines/terms/20/accessibility-supported.html b/guidelines/terms/20/accessibility-supported.html
index 3bd0f873a5..1f42678035 100644
--- a/guidelines/terms/20/accessibility-supported.html
+++ b/guidelines/terms/20/accessibility-supported.html
@@ -80,7 +80,7 @@
The WCAG Working group and the W3C do not specify which or how much support by assistive
technologies there must be for a particular use of a Web technology in order for it
- to be classified as accessibility supported. (See Level of Assistive Technology Support Needed for "Accessibility Support".)
+ to be classified as accessibility supported. (See Level of Assistive Technology Support Needed for "Accessibility Support".)
Web technologies can be used in ways that are not accessibility supported as long
@@ -100,7 +100,7 @@
One way for authors to locate uses of a technology that are accessibility supported
would be to consult compilations of uses that are documented to be accessibility supported.
- (See Understanding Accessibility-Supported Web Technology Uses.) Authors, companies, technology vendors, or others may document accessibility-supported
+ (See Understanding Accessibility-Supported Web Technology Uses.) Authors, companies, technology vendors, or others may document accessibility-supported
ways of using Web content technologies. However, all ways of using technologies in
the documentation would need to meet the definition of accessibility-supported Web
content technologies above.
diff --git a/guidelines/terms/20/conforming-alternate-version.html b/guidelines/terms/20/conforming-alternate-version.html
index 0ea3d68cc0..3fa931349c 100644
--- a/guidelines/terms/20/conforming-alternate-version.html
+++ b/guidelines/terms/20/conforming-alternate-version.html
@@ -64,6 +64,6 @@
the preferences is accessibility supported.
See Understanding Conforming Alternate Versions See Understanding Conforming Alternate Versions interface used by software to obtain keystroke input A keyboard interface allows users to provide keystroke input to programs even if the
- native technology does not contain a keyboard.
- A touchscreen PDA has a keyboard interface built into its operating system as well
- as a connector for external keyboards. Applications on the PDA can use the interface
- to obtain keyboard input either from an external keyboard or from other applications
- that provide simulated keyboard output, such as handwriting interpreters or speech-to-text
- applications with "keyboard emulation" functionality.
- A keyboard interface allows users to provide keystroke input to programs even if the
+ native technology does not contain a keyboard. A touchscreen PDA has a keyboard interface built into its operating system as well
+ as a connector for external keyboards. Applications on the PDA can use the interface
+ to obtain keyboard input either from an external keyboard or from other applications
+ that provide simulated keyboard output, such as handwriting interpreters or speech-to-text
+ applications with "keyboard emulation" functionality. Operation of the application (or parts of the application) through a keyboard-operated
mouse emulator, such as MouseKeys, does not qualify as operation through a keyboard
diff --git a/guidelines/terms/20/technology.html b/guidelines/terms/20/technology.html
index 00db123ea8..9edb054581 100644
--- a/guidelines/terms/20/technology.html
+++ b/guidelines/terms/20/technology.html
@@ -14,7 +14,7 @@
applications.
Some common examples of Web content technologies include HTML, CSS, SVG, PNG, PDF,
+ Some common examples of Web content technologies include HTML, CSS, SVG, PNG, PDF,
Flash, and JavaScript.
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to demonstrate how to use the WAI-ARIA aria-describedby property to provide programmatically determined, descriptive information about a user interface element. The aria-describedby property may be used to attach descriptive information to one or more elements through the use of an id reference list. The id reference list contains one or more unique element ids. Refer to Supporting ARIA in XHTML and HTML 4.01 for information on how to provide WAI-ARIA States and Properties with XHTML and HTML. WAI-ARIA States and Properties is compatible with other languages as well; refer to documentation in those languages. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to demonstrate how to use the WAI-ARIA aria-describedby property to provide programmatically determined, descriptive information about a user interface element. The aria-describedby property may be used to attach descriptive information to one or more elements through the use of an id reference list. The id reference list contains one or more unique element ids. Refer to Supporting ARIA in XHTML and HTML 4.01 for information on how to provide WAI-ARIA States and Properties with XHTML and HTML. WAI-ARIA States and Properties is compatible with other languages as well; refer to documentation in those languages. The aria-describedby property is not designed to reference descriptions on an external resource — since it is an ID, it must reference an element in the same DOM document. A button that functions as a 'close' button on a dialog is described elsewhere in the document. The aria-describedby property is used to associate the description with the link. Working example: Example 1
+ Working example: Example 1
Sample form field using aria-describedby to associate instructions with form fields while there is a form label. The following code snippet shows how to use aria-describedby and the onfocus="tooltipShow() function to display the tooltip when focus is placed on an element. This example is coded in XHTML with a MIME type of application/xhtml+xml. This MIME type is not supported in all user agents. The aria-describedby property is added directly into the XHTML markup, and no additional scripting is needed. This example uses scripting to add an aria-describedby property to buttons on a page. The example creates a buttonIds array variable to hold the ids of the elements that contain description text. The setDescribedBy() function is called from the onload event of the window object. The setDescribedBy() function loops through all of the button elements and calls setAttribute() on each button element to set the aria-describedby property. Each button's aria-describedby property is set to the id of the element containing its descriptive text. Using a user agent and/or assistive technology which supports WAI-ARIA, the description will be provided when the user interface controls receive focus. This technique applies to HTML with Accessible Rich Internet Applications (WAI-ARIA). This technique applies to HTML with Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide a short description for an element that can be read by assistive technologies (AT) by using the aria-labelledby attribute. The aria-labelledby attribute associates an element with text that is visible elsewhere on the page by using an ID reference value that matches the ID attribute of the labeling element. Assistive technology such as screen readers use the text of the element identified by the value of the aria-labelledby attribute as the text alternative for the element with the attribute. This example shows how to use the aria-labelledby attribute to provide a short text description for a read-only complex graphic of an star rating pattern; the graphic is composed of several image elements. The text alternative for the graphic is the label, visible on the page beneath the star pattern. Working example: Providing a short description for a complex graphic.
+ Working example: Providing a short description for a complex graphic.
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Landmarks help assistive technology (AT) users orient themselves to a page and help them navigate easily to various sections of a page.
They also provide an easy way for users of assistive technology to skip over blocks of content that are repeated on multiple pages and notify them of programmatic structure of a page. For instance, if there is a common navigation menu found on every page, landmark roles (or "landmarks") can be used to skip over it and navigate from section to section. This will save assistive technology users and keyboard users the trouble and time of tabbing through a large amount of content to find what they are really after, much like a traditional "skip links" mechanism. (Refer to User Agent Notes above for specifics of AT support). A blind user who may be familiar with a news site's menu, and is only interested in getting to the top story could easily navigate to the "main" landmark, and bypass dozens of menu links. In another circumstance, a user who is blind may want to quickly find a navigation menu, and can do so by jumping to the navigation landmark.
@@ -33,10 +33,10 @@
It is a best practice to include ALL content on the page in landmarks, so that screen reader users who rely on them to navigate from section to section do not lose track of content.
The following example shows how landmarks might be added to an HTML4 or XHTML 1.0 document: The following example shows a best practice of how landmarks might be added to an HTML4 or XHTML 1.0 document in situations where there are more than two of the same type of landmark on the same page. For instance, if a navigation role is used multiple times on a Web page, each instance may have a unique label specified using aria-labelledby:
The following example shows a best practice of how landmarks might be added to an HTML4 or XHTML 1.0 document in situations where there are more than two of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label. The following example shows a search form with a "search" landmark. The search role typically goes on the form field or a div surrounding the search form. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide a way for Assistive Technologies (AT) to identify
a piece of content as a heading. Applying role="heading" to an element causes an AT (like a
screen reader) to treat it as though it were a heading.
@@ -13,12 +13,12 @@
to use h1 rather than using <div role="heading" aria-level="1">. However, the use of the
heading role, instead of heading mark-up, may be necessary. For example, when retrofitting a legacy site where scripts depend on the existing element hierarchy.
The use of the heading role and nesting levels is discussed in WAI-ARIA Authoring Practices 1.1.
+ The use of the heading role and nesting levels is discussed in WAI-ARIA Authoring Practices 1.1.
This example demonstrates how to implement simple headings using role="heading" when retrofitting a legacy site where scripts depend on the existing element hierarchy or the level is unknown. For example, web content which is syndicated from various sources may be constructed without knowledge of what the final presentation will be.
This example demonstrates how to implement a level 7 heading using role="heading" and the aria-level attribute. Since HTML only supports headings through level 6, there is no native element to provide these semantics. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide names for regions of a page that can be read by assistive technology. The aria-labelledby attribute provides a way to associate an section of the page marked up as a region or landmarks with text that is on the page that labels it.
Landmark roles (or "landmarks") programmatically identify sections of a page. Landmarks help assistive technology (AT) users orient themselves to a page and help them navigate easily to various sections of a page.
Like aria-describedby, aria-labelledby can accept multiple ids to point to other regions of the page using a space separated list. It is also limited to ids for defining these sets.
Below is an example of aria-labelledby used on a complementary Landmark. The region of the document to which the heading pertains could be marked with the aria-labelledby property containing the value of the id for the header. The following code snippet for application landmarks with static prose. If you have a regional landmark of type application and static descriptive text is available, then on the application landmark, include an aria-describedby reference to associate the application and the static text as shown here: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). For sighted users, the context and visual appearance of an element can provide sufficient cues to determine the purpose. An example is the 'X' often used in the top right corner of pop-up divs (light boxes) to indicate the control for closing the div.
In some situations, elements can be given the attribute aria-label to provide an accessible name for situations when there is no visible label due to a chosen design approach or layout but the context and visual appearance of the control make its purpose clear.
In other situations, elements can be given the attribute aria-label to provide an accessible name when the native HTML labeling element is not supported by the control - for example, when a div set to contentEditable is used instead of native form elements such as input type="text" or textarea in order to provide a richer text editing experience.
On a page, a link displays a pop-up box (a div) with additional information. The 'close' element is implemented as a button containing merely the letter 'x'. The property aria-label="close" is used to provide an accessible name to the button.
Working example: Close button example.
+ Working example: Close button example.
For elements that use aria-label:
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to provide descriptions of images when a short text alternative does not adequately convey the function or information provided in the object.
A feature of WAI-ARIA is the ability to associate descriptive text with a section, drawing, form element, picture, and so on using the aria-describedby property. This is similar to the longdesc attribute in that both are useful for providing additional information to help users understand complex images. Like longdesc, descriptive text provided using aria-describedby is separate from the short name provided using the alt attribute in HTML. Unlike longdesc, aria-describedby cannot reference descriptions outside of the page containing the image. An advantage of providing long descriptions using content from the same page as the image is that the alternative is available to all, including sighted people who do not have assistive technology. It is worth noting that as of the time of writing (October 2013) some assistive technologies read aria-describedby content immediately after an image's alt attribute information without user activation - whereas most implementations of longdesc require the user to take explicit action to read the additional description.
Like aria-labelledby, aria-describedby can accept multiple ids to point to other regions of the page using a space separated list. It is also limited to ids for defining these sets.
The following example shows how aria-describedby can be applied to an image to provide a long description, where that text description is on the same page as the image.
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide names for user interface controls that can be read by assistive technology. WAI-ARIA provides a way to associate text with a section, drawing, form element, picture, and so on, using the aria-labelledby property. This techniques uses the aria-labelledby attribute to associate a user interface control, such as a form field, with text on the page that labels it.
Like aria-describedby, aria-labelledby can accept multiple ids to point to other elements of the page using a space separated list. This capability makes aria-labelledby especially useful in situations where sighted users use information from the surrounding context to identify a control. Using aria-labelledby to concatenate a label from several text nodes contains more examples of situations where names are created from several other text elements on the page.
@@ -17,26 +17,26 @@
Note that as of December 2013, label has better support than aria-labelledby, especially in older browsers and assistive technologies.
The following is an example of aria-labelledby used on a simple text field to provide a label in a situation where there is no text available for a dedicated label but there is other text on the page that can be used to accurately label the control. Below is an example of aria-labelledby used to provide a label for a slider control. In this case the label text is selected from within a longer adjacent text string. Please note that this example is simplified to show only the labeling relationship; authors implementing custom controls also need to ensure that controls meet other success criteria. The following example of aria-labelledby with multiple references uses the label element. For additional detail on concatenating multiple sources of information into a label with aria-labelledby, please view the technique Using ARIA labelledby to concatenate a label from several text nodes.
Note: The use of the label element is included for a number of reasons. If the user clicks on the text of the label element, the corresponding form field will receive focus, which makes the clicking target larger for people with dexterity problems. Also the label element will always be exposed via the accessibility API. A span could have been used (but if so, it should receive a tabindex="-1" so that it will be exposed via the accessibility API in all versions of Internet Explorer). However, a span would lose the advantage of the larger clickable region.
For each user interface control element where an aria-labelledby attribute is present:
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to mark up a set of related controls within a form as a group. Any label associated with the group also serves as a common label or qualifier for individual controls in the group. Assistive technologies can indicate the start and end of the group and the group’s label as one navigates into and out of the group. This is a viable alternative for grouping form controls programmatically when the user interface’s design makes it difficult to employ the fieldset-legend technique (H71). For a group of radio buttons, one could also use role="radiogroup" instead of role="group". The group can be labeled using aria-labelledby. This technique is not meant for wrapping all controls on a form within a single container with role="group". Social security number fields which are 9 digits long and broken up into 3 segments can be grouped using role="group". Working example: Multiple part field groups. Working example: Multiple part field groups. This example demonstrates use role=radiogroup. Note also that the radio buttons are custom controls with role=radio. (But the script to make the span actually work like radio buttons is not included in this example. ) One may optionally employ CSS to place a border around groups of such fields to visually reinforce the group relationship. The CSS properties are available below the form. Working example: using grouping roles to identify related form controls. Working example: using grouping roles to identify related form controls. For groups of related controls where the individual labels for each control do not provide a sufficient description, and an additional group level description is needed:
Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to alert people that an input error has occured. Using role="alertdialog" creates a notification. This notification should be modal with the following characteristics:
Note that the alertdialog should not be present in a way that it will be accessed by AT until it is needed. One way to do this is not to include it in the static HTML and instead to insert it into the DOM via script when the error condition is triggered. The insertion would correspond to the following HTML sample.
This example shows how a notification using role="alertdialog" can be used to notify someone they have entered invalid information. Working example: Alert dialog. Working example: Alert dialog. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to notify Assistive Technologies (AT) when an input error occurs. The aria-live attribute makes it possible for an AT (such as a screen reader) to be notified when error messages are injected into a Live Region container. The content within the aria-live region is automatically read by the AT, without the AT having to focus on the place where the text is displayed.
There are also a number of special case live region roles which can be used instead of applying live region properties directly. There are also a number of special case live region roles which can be used instead of applying live region properties directly. The following example uses role=alert which is equivalent to using aria-live=assertive.
In the example there is an empty error message container element with aria-atomic=true and an aria-live property or alert role present in the DOM on page load. The error container must be present in the DOM on page load for the error message to be spoken by most screen readers. aria-atomic=true is necessary to make Voiceover on iOS read the error messages after more than one invalid submission.
@@ -51,10 +51,10 @@ Working example: Using role=alert to identify errors. Working example: Using role=alert to identify errors. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to provide programmatic indication that a form field (which shown through presentation to be required) is mandatory for successful submission of a form. The fact that the element is required is often visually presented (via a text or non-text symbol, or text indicating input is required or color / styling) but this is not programmatically determinable as part of the field's name. The WAI-ARIA aria-required property indicates that user input is required before submission. The aria-required property can have values of true or false. For example, if a user must fill in an address field, then aria-required is set to true. Note: Use of aria-required="true" might be beneficial even when an asterisk or other text symbol is programmatically associated with the field as it may reinforce its required property for some assistive technology users. The fact that the element is required is often visually presented (such as a sign or symbol after the control). Using the aria-required property in addition to the visual presentation makes it much easier for user agents to pass on this important information to the user in a user agent-specific manner. Refer to Supporting ARIA in XHTML and HTML 4.01 for information on how to provide WAI-ARIA States and Properties with XHTML and HTML. WAI-ARIA States and Properties is compatible with other languages as well; refer to documentation in those languages. The fact that the element is required is often visually presented (such as a sign or symbol after the control). Using the aria-required property in addition to the visual presentation makes it much easier for user agents to pass on this important information to the user in a user agent-specific manner. Refer to Supporting ARIA in XHTML and HTML 4.01 for information on how to provide WAI-ARIA States and Properties with XHTML and HTML. WAI-ARIA States and Properties is compatible with other languages as well; refer to documentation in those languages. The required property is indicated by an asterisk placed next to the label element: The required property is indicated by the word "required" placed next to the label element: Required fields are indicated by a red border around the fields and a star icon rendered via CSS using content:before. This example also uses custom radio buttons with role=radio but the script to make the span actually work like radio buttons is not included in this example. The CSS properties are available below the form.
The following example shows an XHTML document using the aria-required property to indicate that a form field must be submitted. The mandatory nature of the field is also indicated in the label as a fallback for user agents that do not support WAI-ARIA. This example uses scripting to add the aria-required property to a form element. The required property is assigned using the setAttribute() API. The array variable, requiredIds, is created with the ids of the elements which need to be marked as required. The setRequired() function is called from the onload event of the window object. The setRequired() function loops through all of the ids provided, retrieves the element and assigns the aria-required property of true using the setAttribute() function. When this page is accessed using Firefox 3.0 or later and a screen reader that supports WAI-ARIA, the screen reader will speak "required" when reading the label for the input fields. For each control which is shown via presentation to be required. Technologies that support Accessible Rich Internet Applications. This technique demonstrates how to assign a generic region role to a section of a page so that user agents and assistive technologies may be able to programmatically identify it. The region role demarcates a segment of the page that contains content of significance so that it is more readily discoverable and navigable. The generic region should be used when the section cannot be marked up using a standard document landmark role (see ARIA11). Technologies that support Accessible Rich Internet Applications. This technique demonstrates how to assign a generic region role to a section of a page so that user agents and assistive technologies may be able to programmatically identify it. The region role demarcates a segment of the page that contains content of significance so that it is more readily discoverable and navigable. The generic region should be used when the section cannot be marked up using a standard document landmark role (see ARIA11). It is important to name regions, because they are generic grouping elements and users will need some way to tell which region they are in. Regions can be named using aria-labelledby, aria-label, or another technique. Doing so helps to better expose content and information relationships on the page. The role of region should be used prudently, because if overused they can make the page overly verbose for screen reader users. A section on the home page of a news website that contains a poll that changes every week is marked up with role="region". The h3 text above the form is referenced as the region's name using aria-labelledby. A user can expand links on a bank website after logging in to see details of term deposit accounts. The details are within a span marked up with region role. The heading for the region has role=heading and is included in the aria-labelledby that names the region. This example shows how a generic region landmark might be added to a weather portlet. There is no existing text on the page that can be referenced as the label, so it is labelled with aria-label.
For each section marked up with role="region": HTML with Accessible Rich Internet Applications. HTML with Accessible Rich Internet Applications. This technique demonstrates how aria-invalid may be employed to specifically identify fields that have failed validation. Its use is most suitable when: While it is always preferable to programmatically associate specific error description with the failed field, the page's design or the framework employed may sometimes constrain the author's ability to do so. In these cases, authors may programmatically set aria-invalid to "true" on the fields that have failed validation. This is interpretable mainly by assistive technologies (like screen readers / screen magnifiers) employed by users who are vision impaired. When a field has aria-invalid set to “true”, VoiceOver in Safari announces “invalid data” when the field gets focus; JAWS and NVDA notify the error as an “invalid entry”. This ARIA attribute has to be set / turned on programmatically. It should not be set to “true” before input validation is performed or the form is submitted. Setting aria-invalid to “false” is the same as not placing the attribute for the form control at all. Quite understandably, nothing is conveyed by assistive technology to users in this case. When visible text is used to programmatically identify a failed field and / or convey how the error can be corrected, setting aria-invalid to "true" is not required from a strict compliance standpoint but may still provide helpful information for users. The aria-invalid attribute is used on required fields that have no input. A message above the form conveys that form submission has failed due to this. A portion of the jQuery code and the HTML form markup follow: Aria-invalid and aria-describedby are used together to indicate an error when the personal identification number (PIN), email address, or start date are not in the expected format. The error message is associated with the field using aria-describedby, and aria-invalid makes it easier to programmatically find fields with errors. Below is the rendered HTML code for the email address field in Example 1: When an invalid email address is entered by the user such as "samexample.com" (instead of sam@example.com), the HTML code is: For each form control that relies on aria-invalid to convey a validation failure: ID: W## Technology: ARIA Type: Technique
+ This technique uses the After a user presses a Search button, the page content is updated to include the results of the search, which are displayed in a section below the Search button. The change to content also includes the message "5 results returned" near the top of this new content. This text is given an appropriate role for a status message. A screen reader will announce "Five results returned". After a user presses an Add to Shopping Cart button, content near the Shopping Cart icon updates to read "1 items". The container for this text (in this case a For each status message: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to define the role of an element using the role attribute with one of the non-abstract values defined in the WAI-ARIA Definition of Roles. The WAI-ARIA specification provides an informative description of each role, how it relates to other roles, and the states and properties for each role. When rich internet applications define new user interface widgets, exposing the roles enables users to understand the widget and how to interact with it. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to define the role of an element using the role attribute with one of the non-abstract values defined in the WAI-ARIA Definition of Roles. The WAI-ARIA specification provides an informative description of each role, how it relates to other roles, and the states and properties for each role. When rich internet applications define new user interface widgets, exposing the roles enables users to understand the widget and how to interact with it. The WAI-ARIA Authoring Practices document demonstrates a toolbar containing three buttons. The div element has a role of "toolbar", and the img elements have "button" roles: The Authoring Practices Toolbar Pattern provides a working example of a toolbar.. The WAI-ARIA Authoring Practices demonstrates a tree widget. Note the use of the roles "tree", "treeitem", and "group" to identify the tree and its structure. Here is a simplified excerpt from the code: The Authoring Practices Tree View Pattern provides a working example of a tree. For a user interface component using the role attribute: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to use WAI-ARIA state and property attributes to expose the state, properties and values of a user interface component so that they can be read and set by assistive technology, and so that assistive technology is notified of changes to these values. The WAI-ARIA specification provides a normative description of each attribute, and the role of the user interface elements that they support. When rich internet applications define new user interface widgets, exposing the state and property attributes enables users to understand the widget and how to interact with it. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to use WAI-ARIA state and property attributes to expose the state, properties and values of a user interface component so that they can be read and set by assistive technology, and so that assistive technology is notified of changes to these values. The WAI-ARIA specification provides a normative description of each attribute, and the role of the user interface elements that they support. When rich internet applications define new user interface widgets, exposing the state and property attributes enables users to understand the widget and how to interact with it. A widget with role button acts as a toggle button when it implements the attribute aria-pressed. When aria-pressed is true, the button is in a "pressed" state. When aria-pressed is false, it is not pressed. If the attribute is not present, the button is a simple command button. The following snippet from The Open Ajax Accessibility Examples, Example 38, shows WAI-ARIA mark-up for a toggle button that selects bold text: This button is available as part of the working example of Example 38 - Toolbar using inline images for visual state, on the OpenAjax Alliance site. A widget with role slider lets a user select a value from within a given range. The slider represents the current value and the range of possible values via the size of the slider and the position of the handle. These properties of the slider are represented by the attributes aria-valuemin, aria-valuemax, and aria-valuenow. The following snippet from The Open Ajax Accessibility Examples, Example 32, shows WAI-ARIA mark-up for a slider created in Javascript. Note that the javascript sets the attributes aria-valuemin, aria-valuemax, and aria-valuenow: This slider is available as part of the working example of Example 32 - Slider, on the OpenAjax Alliance site.
- The WAI-ARIA specification, Section 5.3, Categorization of Roles defines the required and inherited states and properties for each role. For a user interface component using the WAI-ARIA role attribute: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide a label for objects that can be read by assistive technology. The aria-label attribute provides the text label for an object, such as a button. When a screen reader encounters the object, the aria-label text is read so that the user will know what it is. Authors should be aware that aria-label may be disregarded by assistive technologies in situations where aria-labelledby is used for the same object. For more information on the naming hierarchy please consult the ARIA specification and the accessible name and description calculation in the HTML to Platform Accessibility APIs Implementation Guide. Authors should be aware that use of aria-label will override any native naming such as alt on images or label associated with a form field using the for attribute. Authors should be aware that aria-label may be disregarded by assistive technologies in situations where aria-labelledby is used for the same object. For more information on the naming hierarchy please consult the ARIA specification and the accessible name and description calculation in the HTML to Platform Accessibility APIs Implementation Guide. Authors should be aware that use of aria-label will override any native naming such as alt on images or label associated with a form field using the for attribute. The following example shows how aria-label could be used to distinguish two navigation landmarks in a HTML4 and XHTML 1.0 document, where there are more than two of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label. The following example shows how a generic "region" landmark might be added to a weather portlet. There is no existing text on the page that can be referenced as the label, so it is labelled with aria-label. Below is an example of a MathML function, using the math role, appropriate label, and MathML rendering: For each element where a aria-label attribute is present. Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). With the aria-labelledby attribute, authors can use a visible text element on the page as a label for a focusable element (a form control or a link). For example, a "read more..." link could be associated with the text of the heading of the preceding section to make the purpose of the link unambiguous (see example 1). When associating text to a focusable element with the help of aria-labelledby, the target text element is given an ID which is referenced in the value of the aria-labelledby attribute of the focusable element. It is also possible to use several text elements on the page as a label for a focusable element. Each of the text elements used must be given a unique ID which is referenced as a string of IDs (IDREF) in the value of the aria-labelledby attribute. The label text should then be concatenated following the order of IDs in the value of the aria-labelledby attribute. When applied on links, aria-labelledby can be used to identify the purpose of a link that may be readily apparent for sighted users, but less obvious for screen reader users. The specified behavior of aria-labelledby is that the associated label text is announced instead of the link text (not in addition to the link text). When the link text itself should be included in the label text, the ID of the link should be referenced as well in the string of IDs forming the value of the aria-labelledby attribute. For more information on the naming hierarchy please consult the ARIA specification and the accessible name and description calculation for links in the HTML to Platform Accessibility APIs Implementation Guide. For more information on the naming hierarchy please consult the ARIA specification and the accessible name and description calculation for links in the HTML to Platform Accessibility APIs Implementation Guide. This example will mean that the link text as shown on screen is then used as the start of the accessible name for the link. Popular screen readers like JAWS and NVDA will announce this as:
"Read more ...Storms hit east coast" and will display that same text in the links list which is very useful for screen reader users who may browse by links. There may be cases where an author will placed a tag around a section of code that will be referenced. Note: The use of tabindex="-1" on the span element is not meant to support focusing by scripts - here, it merely serves to ensure that some browsers (IE9, IE10) will include the span element in the accessibility tree, thus making it available for reference by aria-labelledby. For more details see Accessible HTML Elements. For each link that has an aria-labelledby attribute: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The objective of this technique is to describe the purpose of a link using the aria-label attribute. The aria-label attribute provides a way to place a descriptive text label on an object, such as a link, when there are no elements visible on the page that describe the object. If descriptive elements are visible on the page, the aria-labelledby attribute should be used instead of aria-label. Providing a descriptive text label lets a user distinguish the link from links in the Web page that lead to other destinations and helps the user determine whether to follow the link. In some assistive technologies the aria-label value will show in the list of links instead of the actual link text. Per the WAI-ARIA specification and the HTML to Platform Accessibility APIs Implementation Guide, the aria-label text will override the text supplied within the link. As such the text supplied will be used instead of the link text by AT. Due to this it is recommended to start the text used in aria-label with the text used within the link. This will allow consistent communication between users. Per the WAI-ARIA specification and the HTML to Platform Accessibility APIs Implementation Guide, the aria-label text will override the text supplied within the link. As such the text supplied will be used instead of the link text by AT. Due to this it is recommended to start the text used in aria-label with the text used within the link. This will allow consistent communication between users. In some situations, designers may choose to lessen the visual appearance of links on a page by using shorter, repeated link text such as "read more". These situations provide a good use case for aria-label in that the simpler, non-descriptive "read more" text on the page can be replaced with a more descriptive label of the link. The words 'read more' are repeated in the aria-label (which replaces the original anchor text of "[Read more...]") to allow consistent communication between users. For link elements that use aria-label: Technologies that support Accessible Rich Internet Applications (WAI-ARIA). Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The aria-labelledby property can be used to label all visual objects. Applied to inputs, the aria-labelledby property can be used to label native inputs as well as non-native elements, such as custom text inputs constructed with div contenteditable="true". One particular use of aria-labelledby is for text inputs in situations where a meaningful label should consist of more than one label string. Authors assign unique ids to the label strings to be concatenated as the label for the input element. The value of the aria-labelledby attribute is then a space-separated list of all ids in the order in which the label strings referenced should be read by screen readers. Supporting user agents will concatenate the label strings referenced and read them as one continuous label of the input. The concatenation of label strings can be useful for different reasons. In example 1, an input is nested within the context of a full sentence. The desired screen reader output is "Extend time-out to [ 20 ] minutes - edit with autocomplete, selected 20". Since the id of the text input is included in the string of ids referenced by aria-labelledby, the value of the input is included in the concatenated label at the right position. Another application of aria-labelledby is when there is no space to provide a visible label next to the input, or when using native labels would create unnecessary redundancy. Here, the use aria-labelledby makes it possible to associate visible elements on the page as label for such inputs. This is demonstrated in example 2 where table column and row headings are concatenated into labels for the text input elements inside the table. The ARIA accessible name and description calculation specifies that the string specified in aria-labelledby should replace rather than add to the content of the element that carries the property. So adding the aria-labelledby property to a native label should replace the text content inside that label unless the label itself is referenced as part of the sequence of ids in aria-labelledby. The ARIA accessible name and description calculation specifies that the string specified in aria-labelledby should replace rather than add to the content of the element that carries the property. So adding the aria-labelledby property to a native label should replace the text content inside that label unless the label itself is referenced as part of the sequence of ids in aria-labelledby. A text input allows users to extend the default time before a time-out occurs. The string "Extend time-out to" is contained in a native label element and is associated with the input with the input by id="timeout-duration" . This label is associated with this input using the for/id association only on user agents that don't support ARIA. On user agents that support ARIA, the for/id association is ignored and the label for the input is provided only by aria-labelledby, per the accessible name and description calculation in the HTML to Platform Accessibility APIs Implementation Guide. The string "Extend time-out to" is contained in a native label element and is associated with the input with the input by id="timeout-duration" . This label is associated with this input using the for/id association only on user agents that don't support ARIA. On user agents that support ARIA, the for/id association is ignored and the label for the input is provided only by aria-labelledby, per the accessible name and description calculation in the HTML to Platform Accessibility APIs Implementation Guide. The aria-labelledby attribute on the text input references three elements: (1) the span containing the native label, (2) the text input containing the default text '20' (recall that this input is not labelled with the for/id associated label text), and (3) the string 'minutes' contained in a span. These elements should be concatenated to provide the full label for the text input The use of tabindex="-1" on the span element is not meant to support focusing by scripts - here, it merely serves to ensure that some browsers (IE9, IE10) will include the span element in the accessibility tree, thus making it available for reference by aria-labelledby. For more details see Accessible HTML Elements
@@ -26,12 +26,12 @@ Working example, Time-out input field with concatenated label, adapted from Easy ARIA tip #2: aria-labelledby and aria-describedby, an example put together by Marco Zehe. Working example, Time-out input field with concatenated label, adapted from Easy ARIA tip #2: aria-labelledby and aria-describedby, an example put together by Marco Zehe. A simple data table containing text inputs. The input labels are concatenated through aria-labelledby referencing the respective column and row headers. Working example, Using aria-labelledby for simple table with text inputs, based on an example by Jim Thatcher. Working example, Using aria-labelledby for simple table with text inputs, based on an example by Jim Thatcher. A conference workshop booking table with two parallel tracks allows users to select the workshop they want to attend. When tabbing through the checkbox inputs in the table, the track (1 or 2), the title, and the speaker of the workshop followed by the adjacent checkbox label "Attend" are provided as concatenated label for the checkboxes via aria-labelledby. Some browser / screen reader combinations (e.g. Mozilla Firefox and NVDA) will in addition speak the relevant table cell headers. Working example: Conference workshop booking timetable. Working example: Conference workshop booking timetable. For inputs that use aria-labelledby:
Time limits that are controlled by client-side scripting.
The objective of this technique is to allow user to extend the default time limit by providing a mechanism to extend the time when scripts provide functionality that has default time limits. In order to allow the user to request a longer time limit, the script can provide a form (for example) allowing the user to enter a larger time limit or indicating that more time is needed. If the user is being warned that a time limit is about to expire (see ), this form can be made available from the warning dialog. The user can extend the time limit to at least 10 times the default time limit, either by allowing the user to indicate how much additional time is needed or by repeatedly allowing the user to extend the time limit. Scripting technologies which use scripting alerts for non-emergency communication. The objective of this technique is to display a dialog containing a message (alert) to the user. When the alert is displayed, it receives focus and the user must activate the OK button on the dialog to dismiss it. Since these alerts cause focus to change they may distract the user, especially when used for non-emergency information. Alerts for non-emergency purposes such as displaying a quote of the day, helpful usage tip, or count down to a particular event, are not presented unless the user enables them through an option provided in the Web page. This technique assigns a global JavaScript variable to store the user preference for displaying alerts. The default value is false. A wrapper function is created to check the value of this variable before displaying an alert. All calls to display an alert are made to this wrapper function rather than calling the alert() function directly. Early in the page, a button is provided for the user to enable the display of alerts on the page. This technique works on a visit by visit basis. Each time the page is loaded, alerts will be disabled and the user must manually enable them. Alternatively, the author could use cookies to store user preferences across sessions. The script below will display a quote in an alert box every ten seconds, if the user selects the "Turn Alerts On" button. The user can turn the quotes off again by choosing "Turn Alerts Off". Within the body of the page, include a way to turn the alerts on and off. Below is one example: Working example of this code: Demonstration of Alerts. Working example of this code: Demonstration of Alerts. For a Web page that supports non-emergency interruptions using a JavaScript alert:
Time limits exist that are controlled by script.
The objective of this technique is to notify users that they are almost out of time to complete an interaction. When scripts provide functionality that has time limits, the script can include functionality to warn the user of imminent time limits and provide a mechanism to request more time. 20 seconds or more before the time limit occurs, the script provides a confirm dialog that states that a time limit is imminent and asks if the user needs more time. If the user answers "yes" then the time limit is reset. If the user answers "no" or does not respond, the time limit is allowed to expire.
This technique involves time limits set with the window.setTimeout() method. If, for example, the time limit is set to expire in 60 seconds, you can set the time limit for 40 seconds and provide the confirm dialog. When the confirm dialog appears, a new time limit is set for the remaining 20 seconds. Upon expiry of the "grace period time limit" the action that would have been taken at the expiry of the 60 second time limit in the original design is taken.
A page of stock market quotes uses script to refresh the page every five minutes in order to ensure the latest statistics remain available. 20 seconds before the five minute period expires, a confirm dialog appears asking if the user needs more time before the page refreshes. This allows the user to be aware of the impending refresh and to avoid it if desired.
On a Web page that has a time limit controlled by a script: Content that validates user input. The objective of this technique is to validate user input as values are entered for each field, by means of client-side scripting. If errors are found, an alert dialog describes the nature of the error in text. Once the user dismisses the alert dialog, it is helpful if the script positions the keyboard focus on the field where the error occurred. The following script will check that a valid date has been entered in the form control. The following sample shows multiple controls in a form. The form element uses the onsubmit attribute which creates an event handler to execute the validation script when the user attempts to submit the form. If the validation is successful, the event returns true and the form submission proceeds; if the validation finds errors, it displays an error message and returns false to cancel the submit attempt so the user can fix the problems. This example demonstrates an alert for simplicity. A more helpful notification to the user would be to highlight the controls with problems and add information to the page about the nature of the errors and how to navigate to the controls that require data fixes. This is demonstrated in the working example of checking multiple controls when the user submits the form. This is demonstrated in the working example of checking multiple controls when the user submits the form. For form fields that require specific input: HTML and XHTML with support for scripting. This technique uses the try/catch
construct of JavaScript 1.4. The objective of this technique is to demonstrate how to correctly use an
onchange event with a select element to update other elements on the Web page. This technique will not cause a change of context. When there are one
or more select elements on the Web page, an onchange event on one, can
@@ -14,9 +14,9 @@
that assistive technologies will pick up the change and users will encounter
the new data when the modified element receives focus. This technique relies
on JavaScript support in the user agent. This example contains two select elements. When an item is selected
in the first select, the choices in the other select are updated
appropriately. The first select element contains a list of
@@ -37,11 +37,11 @@
Here is a working example: Dynamic
+
+ Here is a working example: Dynamic
Select
HTML and XHTML with scripting support. The objective of this technique is to demonstrate using device independent events to change a decorative image in response to a mouse or focus event. Use the onmouseover and onmouseout events to change a decorative image when the mouse moves on top of or away from an element on the page. Also, use the onfocus and onblur events to change the image when the element receives and loses focus. The example below has a decorative image in front of an anchor element. When the user mouses over the anchor tag, the decorative image in front of the anchor is changed. When the mouse moves off of the anchor, the image is changed back to its original version. The same image change effect occurs when the user gives keyboard focus to the anchor element. When focus is received the image changes, when focus is lost the image is changed back. This is accomplished by attaching onmouseover, onmouseout, onfocus and onblur event handlers to the anchor element. The event handler is a JavaScript function called updateImage(), which changes the src attribute of the image. The updateImage() is called in response to the onmouseover, onmouseout, onfocus, and onblur events. Each image is given a unique id. This unique id is passed to updateImage() along with a boolean value indicating which image is to be used: updateImage(imgId, isOver);. The boolean value of true is passed when the mouse is over the anchor element or it has focus. A false value is passed when the mouse moves off of the anchor element or it loses focus. The updateImage() function uses the image id to load the image and then changes the src attribue based on the boolean value. Note that since the image is for decorative purposes, it has a null alt attribute. It is best to use images that are similar in size and to specify the height and width attributes on the image element. This will prevent any changes to the layout of the page when the image is updated. This example uses images which are identical in size. Load the Web page and test the events using a mouse and via the keyboard. Applies to all content that uses Script to implement functionality.
The objective of this technique is to illustrate the use of both keyboard-specific and mouse-specific events with code that has a scripting function associated with an event. Using both keyboard-specific and mouse-specific events together ensures that content can be operated by a wide range of devices. For example, a script may perform the same action when a keypress is detected that is performed when a mouse button is clicked. This technique goes beyond the Success Criterion requirement for keyboard access by including not only keyboard access but access using other devices as well.
+
1 Although click is in principle a mouse event handler, most HTML and XHTML user agents also process this event when a native HTML control (e.g. a button or a link) is activated, regardless of whether it was activated with the mouse or the keyboard. In practice, therefore, it is not necessary to duplicate this event when adding handlers to natively focusable HTML elements. However, it is necessary when adding handlers to other events, such as in Example 2 below.
2 Since the keypress event handler reacts to any key, the event handler function should check first to ensure the Enter key was pressed before proceeding to handle the event. Otherwise, the event handler will run each time the user presses any key, even the tab key to leave the control, and this is usually not desirable.
Some mouse-specific functions (such as dblclick and mousemove) do not have a corresponding keyboard-specific function. This means that some functions may need to be implemented differently for each device (for example, including a series of buttons to execute, via keyboard, the equivalent mouse-specific functions implemented). In this example of an image link, the image is changed when the user positions the pointer over the image. To provide keyboard users with a similar experience, the image is also changed when the user tabs to it.
This example shows a custom image control for which both the mouse and the keyboard can be used to activate the function. The mouse event onclick is duplicated by an appropriate keyboard event onkeypress. The tabindex attribute ensures that the keyboard will have a tab stop on the image. Note that in this example, the nextPage() function should check that the keyboard key pressed was Enter, otherwise it will respond to all keyboard actions while the image has focus, which is not the desired behavior. This example uses tabindex on an img element. Even though this is currently invalid, it is provided as a transitional technique to make this function work. Custom controls like this should also use WAI-ARIA to expose the role and state of the control. ECMAScript used inside HTML and XHTML The objective of this technique is to demonstrate how to use functions of the Document Object Model (DOM) to add content to a page instead of using document.write or object.innerHTML. The document.write() method does not work with XHTML when served with the correct MIME type (application/xhtml+xml), and the innerHTML property is not part of the DOM specification and thus should be avoided. If the DOM functions are used to add the content, user agents can access the DOM to retrieve the content. The createElement() function can be used to create elements within the DOM. The createTextNode() is used to create text associated with elements. The appendChild(), removeChild(), insertBefore() and replaceChild() functions are used to add and remove elements and nodes. Other DOM functions are used to assign attributes to the created elements. When adding focusable elements into the document, do not add tabindex attributes to explicitly set the tab order as this can cause problems when adding focusable elements into the middle of a document. Let the default tab order be assigned to the new element by not explicitly setting a tabindex attribute. This example demonstrates use of client-side scripting to validate a form. If errors are found appropriate error messages are displayed. The example uses the DOM functions to add error notification consisting of a title, a short paragraph explaining that an error has occurred, and a list of errors in an ordered list. The content of the title is written as a link so that it can be used to draw the user's attention to the error using the focus method. Each item in the list is also written as a link that places the focus onto the form field in error when the link is followed. For simplicity, the example just validates two text fields, but can easily be extended to become a generic form handler. Client-side validation should not be the sole means of validation , and should be backed up with server-side validation. The benefit of client-side validation is that you can provide immediate feedback to the user to save them waiting for the errors to come back from the server, and it helps reduce unnecessary traffic to the server. Here is the script that adds the event handlers to the form. If scripting is enabled, the validateNumbers() function will be called to perform client-side validation before the form is submitted to the server. If scripting is not enabled, the form will be immediately submitted to the server, so validation should also be implemented on the server.
Here is the validation function. Note the use of the createElement(), createTextNode(), and appendChild() DOM functions to create the error message elements. Below are the helper functions to create the error message and to set focus to the associated form field. Here is the HTML for the example form. This example is limited to client-side scripting, and should be backed up with server-side validation. The example is limited to the creation of error messages when client-side scripting is available.
Here is a link to a working example: Form Validation
+ Here is a link to a working example: Form Validation
For pages that dynamically create new content: Technologies that support script-controlled blinking of content. The objective of this technique is to control blinking with script so it can be set to stop in less than five seconds by the script. Script is used to start the blinking effect of content, control the toggle between visible and hidden states, and also stop the effect at five seconds or less. The setTimeout() function can be used to toggle blinking content between visible and hidden states, and stop when the number of iterations by the time between them adds up to nearly five seconds. This example uses JavaScript to control blinking of some HTML and XHTML content. JavaScript creates the blinking effect by changing the visibility status of the content. It controls the start of the effect and stops it within five seconds. Working example of this code: Using script to control blinking. Working example of this code: Using script to control blinking. For each instance of blinking content: HTML 4.01 and XHTML 1.0 The objective of this technique is to avoid confusion that may be caused by
the appearance of new windows that were not requested by the user. Suddenly
opening new windows can disorient or be missed completely by some users.
@@ -10,21 +10,21 @@
example below demonstrates how to open new windows with script: it adds an
event handler to a link (a element) and warns the user that the
content will open in a new window. Markup: The script is included in the head of the document, and the link has
an id that can be used as a hook by the script. Script: HTML and XHTML, script The objective of this technique is to place inserted user interface elements into the Document Object Model (DOM) in such a way that the tab order and screen-reader reading order are set correctly by the default behavior of the user agent. This technique can be used for any user interface element that is hidden and shown, such as menus and dialogs. The reading order in a screen-reader is based on the order of the HTML or XHTML elements in the Document Object Model, as is the default tab order. This technique inserts new content into the DOM immediately following the element that was activated to trigger the script. The triggering element must be a link or a button, and the script must be called from its onclick event. These elements are natively focusable, and their onclick event is device independent. Focus remains on the activated element and the new content, inserted after it, becomes the next thing in both the tab order and screen-reader reading order. Note that this technique works for synchronous updates. For asynchronous updates (sometimes called AJAX), an additional technique is needed to inform the assistive technology that the asynchronous content has been inserted. This example creates a menu when a link is clicked and inserts it after the link. The onclick event of the link is used to call the ShowHide script, passing in an ID for the new menu as a parameter. The ShowHide script creates a div containing the new menu, and inserts a link into it. The last line is the core of the script. It finds the parent of the element that triggered the script, and appends the div it created as a new child to it. This causes the new div to be in the DOM after the link. When the user hits tab, the focus will go to the first focusable item in the menu, the link we created. CSS is used to make the div and link look like a menu. HTML and XHTML, script The objective of this technique is to provide a mechanism for re-ordering component which is both highly usable and accessible. The two most common mechanisms for reordering are to send users to a set-up page where they can number components, or to allow them to drag and drop components to the desired location. The drag and drop method is much more usable, as it allows the user to arrange the items in place, one at a time, and get a feeling for the results. Unfortunately, drag and drop relies on the use of a mouse. This technique allows users to interact with a menu on the components to reorder them in place in a device independent way. It can be used in place of, or in conjunction with drag and drop reordering functionality. The menu is a list of links using the device-independent onclick event to trigger scripts which re-order the content. The content is re-ordered in the Document Object Model (DOM), not just visually, so that it is in the correct order for all devices. This example does up and down reordering. This approach can also be used for two-dimensional reordering by adding left and right options. The components in this example are list items in an unordered list. Unordered lists are a very good semantic model for sets of similar items, like these components. The menu approach can also be used for other types of groupings. The modules are list items, and each module, in addition to content in div elements, contains a menu represented as a nested list. Since we've covered the showing and hiding of menus in the simple tree samples, we'll focus here just on the code that swaps the modules. Once we harmonize the events and cancel the default link action, we go to work. First, we set a bunch of local variables for the elements with which we'll be working: the menu, the module to be reordered, the menuLink. Then, after checking the reorder direction, we try to grab the node to swap. If we find one, we then call swapNode() to swap our two modules, and PositionElement() to move the absolutely-positioned menu along with the module, and then set focus back on the menu item which launched the whole thing. The CSS for the node swap is not much different than that of our previous tree samples, with some size and color adjustment for the modules and the small menu. Technologies that provide client side scripting. This technique allows users to skip repeated material by placing that material in a menu that can be expanded or collapsed under user control. The user can skip the repeated material by collapsing the menu. The user invokes a user interface control to hide or remove the elements of the menu. The resources section lists several techniques for menus, toolbars and trees, any of which can be used to provide a mechanism for skipping navigation. Similiar approaches can be implemented using server-side scripting and reloading a modified version of the Web page. The navigation links at top of a Web page are all entries in a menu implemented using HTML, CSS, and Javascript. When the navigation bar is expanded, the navigation links are available to the user. When the navigation bar is collapsed, the links are not available. Working example of this code: Toggle navigation bar with a link. Working example of this code: Toggle navigation bar with a link. The table of contents for a set of Web pages is repeated near the beginning of each Web page. A button at the beginning of the table of contents lets the user remove or restore it on the page. Working example of this code: Toggle table of contents with a button. Working example of this code: Toggle table of contents with a button. HTML and XHTML, Script The objective of this technique is to demonstrate how to provide keyboard access to a user interface control that is implemented by actions to static HTML elements such as div or span. This technique ensures that the element is focusable by setting the tabindex attribute, and it ensures that the action can be triggered from the keyboard by providing an onkeyup or onkeypress handler in addition to an onclick handler. When the tabindex attribute has the value 0, the element can be focused via the keyboard and is included in the tab order of the document. When the tabindex attribute has the value -1, the element cannot be tabbed to, but focus can be set programmatically, using element.focus(). Because static HTML elements do not have actions associated with them, it is not possible to provide a backup implementation or explanation in environments in which scripting is not available. This technique should only be used in environments in which client-side scripting can be relied upon. Such user interface controls must still satisfy Success Criterion 4.1.2. Applying this technique without also providing role, name, and state information about the user interface control will results in Failure F59, Failure of Success Criterion 4.1.2 due to using script to make div or span a user interface control in HTML. The div element on the page is given a unique id attribute and a tabindex attribute with value 0. A script uses the Document Object Model (DOM) to find the div element by its id and add the onclick handler and the onkeyup handler. The onkeyup handler will invoke the action when the Enter key is pressed. Note that the div element must be loaded into the DOM before it can be found and modified. This is usually accomplished by calling the script from the onload event of the body element. The script to add the event handlers will only execute if the user agent supports and has JavaScript enabled. Working example of this code: Creating Divs with Actions using JavaScript. Working example of this code: Creating Divs with Actions using JavaScript. In a user agent that supports Scripting: Client-side scripting used with HTML and XHTML The purpose of this technique is to allow users to choose to have additional information added to the text of links so that the links can be understood out of context. Some users prefer to have links that are self-contained, where there is no need to explore the context of the link. Other users find including the context information in each link to be repetitive and to reduce their ability to use a site. Among users of assistive technology, the feedback to the working group on which is preferable has been divided. This technique allows users to pick the approach that works best for them. A link is provided near the beginning of the page that will expand the link text of the links on the page so that no additional context is needed to understand the purpose of any link. It must always be possible to understand the purpose of the expansion link directly from its link text. This technique expands the links only for the current page view. It is also possible, and in some cases would be advisable, to save this preference in a cookie or server-side user profile, so that users would only have to make the selection once per site. This example uses Javascript to add contextual information directly to the text of a link. The link class is used to determine which additional text to add. When the "Expand Links" link is activated, each link on the page is tested to see whether additional text should be added. Working example of this code: Providing link expansions on demand. Working example of this code: Providing link expansions on demand. In the example below the background color is defined on the CSS
stylesheet, however the foreground color is not defined. Therefore,
the example fails the Success Criterion. In the example below the foreground color is defined on the CSS
stylesheet, however the background color is not defined. Therefore,
the example fails the Success Criterion. In the example below the link text (foreground) color is defined on
the body element. However, the background color is not defined.
Therefore, the example fails the Success Criterion. In the example below the background color is defined on the body
element, however the foreground color is not defined. Therefore, the
example fails the Success Criterion. Note that the use of the bgcolor attribute is deprecated as of HTML 4, but this failure example is included as this usage is still found on some web sites. In the example below the foreground color is defined on the body
element, however the background color is not defined. Therefore, the
example fails the Success Criterion. Note that the use of the text attribute is deprecated as of HTML 4, but this failure example is included as this usage is still found on some web sites. If step #2 is true but step #3 is false, OR if step #3 is true but step #2 is false then this
failure condition applies and content fails these Success Criteria. All technologies. This describes a failure condition when the Web page has a title, but the
title does not identify the contents or purpose of the Web page. Examples of text that are not titles include: A site generated using templates includes the same title for each
page on the site. So the title cannot be used to distinguish among
the pages. All technologies. The objective of this technique is to show how using a graphical symbol to convey information can make content difficult to comprehend. A graphical symbol may be an image, an image of text or a pictorial or decorative character symbol (glyph) which imparts information nonverbally. Examples of graphical symbols include an image of a red circle with a line through it, a "smiley" face, or a glyph which represents a check mark, arrow, or other symbol but is not the character with that meaning. Assistive technology users may have difficulty determining the meaning of the graphical symbol. If a graphical symbol is used to convey information, provide an alternative using features of the technology or use a different mechanism that can be marked with an alternative to represent the graphical symbol. For example, an image with a text alternative can be used instead of the glyph.
A shopping cart uses two simple glyphs to indicate whether an item is available for immediate shipment. A check mark indicates that the item is in stock and ready to ship. An "x" mark indicates that the item is currently on back order and not available for immediate shipment. An assistive technology user could not determine the status of the current item. All technologies that support CSS. The CSS background-image property provides a way to include images in the
document with CSS without any reference in the HTML code. The CSS
background-image property was designed for decorative purposes and it is not
@@ -13,36 +13,36 @@
Embedding information into a background image can also cause problems for people who use alternate backgrounds in order to increase legibility and for users of high contrast mode in some operating systems. These users, would lose the information in the background image due to lack of any alternative text. In the following example, part of the content is contained in an
image that is presented by CSS alone. In this example, the image
TopRate.png is a 180 by 200 pixel image that contains the text,
"19.3% APR Typical Variable." It is used in this excerpt: A book distributor uses background images to provide icons against a
list of book titles to indicate whether they are new, limited,
in-stock, or out of stock. The CSS contains: It is used in this excerpt: Using the code from example 1, the same background image is declared in the HTML style attribute: Applies to all technologies. This describes a failure condition for all techniques involving text
alternatives. If the text in the "text alternative" cannot be used in place
of the non-text content without losing information or function then it fails
because it is not, in fact, an alternative to the non-text content. Examples of text that are not text alternatives include: Applies to all technologies. Components that have the same function in different Web pages are more
easily recognized if they are labeled consistently. If the naming is not
consistent, some users may get confused. One of the most common examples of using inconsistent labels for
components with the same function is to use a button that says
"search" in one page and to use a button that says "find" on another
page when they both serve the identical function. An online authoring tool that uses a button with "Save page" on one
page and "Save" on another page, in both cases for the same
function. If step #2 is false then this failure condition applies and content fails
the Success Criterion. All technologies. The objective of this technique is to describe how using white space characters, such as space, tab, line break, or carriage return, to format individual words visually can be a failure to present meaningful sequences properly. When blank characters are inserted to control letter spacing within a word, they may change the interpretation of the word or cause it not to be programmatically recognized as a single word.
Inserting white space characters into an initialism is not an example of this
@@ -10,49 +10,49 @@
initialism and may make it easier to understand. The use of white space between words for visual formatting is not a failure,
since it does not change the interpretation of the words. This example has white spaces within a word to space out the letters
in a heading. Screen readers may read each letter individually
instead of the word "Welcome." can also be used to add white space, producing similar
failures: In Japanese, Han characters (Kanji) may have multiple readings that
mean very different things. In this example, the word is read
incorrectly because screen readers may not recognize these
characters as a word because of the white space between the
characters. The characters mean "Tokyo," but screen readers say
"Higashi Kyo". In the row header cell of a data table containing Japanese text,
authors often create vertical text by using line break characters.
However screen readers are not able to read the words in vertical
text correctly because the line breaks occur within the word. In the
following example, "東京都"(Tokyo-to) will be read "Higashi Kyo
Miyako". For each word that appears to have non-standard spacing between
characters: All technologies. The objective of this technique is to describe how using white space
characters, such as space, tab, line break, or carriage return, to format columns of
data in text content is a failure to use structure properly. Assistive
@@ -14,12 +14,12 @@
Plain text is not suitable for displaying multiple columns of text. Modify
the content to present the data in a different layout. Alternatively, use a
technology that provides structural elements to represent columnar data. The following example incorrectly uses white space characters to
format a paragraph into a two column format. If this table was to be interpreted and spoken by a screen reader it
would speak the following lines: All technologies. The objective of this technique is to describe how using white space
characters, such as space, tab, line break, or carriage return, to format tables in text
content is a failure to use structure properly. When tables are created in
@@ -19,12 +19,12 @@
visual formatting to represent tabular relations,
tabular information would need to be presented using a different technology or presented linearly. (See Presenting tabular information in plain text) The following example incorrectly uses white space to format a Menu
as a visual table. If this table was to be interpreted and spoken by a screen reader it
would speak the following lines: HTML and XHTML Forms are frequently designed so that they submit automatically when the user
has filled in all the fields, or when focus leaves the last field. There are
two problems with this approach. First is that a disabled user who needs
@@ -14,10 +14,10 @@
each item is navigated with the keyboard, again accidentally submitting the
form. It is better to rely on the standard form behavior of the submit
button and enter key. This failure example submits a form when the user leaves the last
field of a three-field telephone number form. The form will submit
if the user leaves the field after editing it, even navigating
@@ -25,7 +25,7 @@ This is a example that submits a form when the user
selects an option from the menu when there is no warning of this behavior in advance. The form will submit as soon as an item from the menu is selected. A user using a keyboard will not be able to navigate past the first item in the menu. Blind users and users with hand tremors can easily make a mistake on which item on the dropdown menu to choose and they are taken to the wrong destination before they can correct it. HTML and XHTML This document describes a failure that occurs when changing the selection of a
radio button, a check box or an item in a select list causes a new window to
open. It is possible to use scripting to create an input
element that causes a change of context (submit the form, open a new page, a
new window) when the element is selected. Developers can instead use a
- submit button (see Providing a submit
+ submit button (see Providing a submit
button to initiate a change of context) or clearly indicate the
expected action. The example below fails the Success Criterion because it processes
the form when a radio button is selected instead of using a submit
button. If step #3 is false, then this failure condition applies and content
fails the Success Criterion. HTML and XHTML This describes a failure condition for text alternatives for images that
should be ignored by AT. If there is no alt attribute at all assistive
technologies are not able to ignore the non-text content. The alt attribute
must be provided and have a null value (i.e., alt="" ) to avoid a failure of this Success Criterion. This describes a failure condition for text alternatives for images that should be ignored by assistive technology (AT). If an image has the attribute role="presentation", it will be ignored by AT. However, if it does not have role="presentation", and if there is no alt attribute at all assistive technologies are not able to ignore the image. For decorative images which need to be ignored by AT, either role="presentation" must be used or the alt attribute must be provided and have a null value (i.e., alt="") to avoid a failure of this Success Criterion. For any img element that is used for purely decorative content: Applies to HTML and XHTML. This technique describes a failure condition for images that should
be ignored by assistive technologies. A text alternative for an image
should convey the meaning of the image. When an image is used for decoration,
@@ -10,10 +10,10 @@
Providing a null text alternative (i.e., alt="" )
will allow assistive technology to ignore the image and avoid a failure
of this Success Criterion. An image is used to create a blank space between content, where the
spacing itself is not meaningful to the content. The image has an alt
text value of "spacer". This image fails the Success Criterion
@@ -22,9 +22,9 @@ Cascading Style Sheets. CSS defines the blink value for the text-decoration
property. When used, it causes any text in elements with this property to
blink at a predetermined rate. This cannot be interrupted by the user, nor
@@ -10,18 +10,18 @@
long as the page is displayed. Therefore, content that uses
text-decoration:blink fails the Success Criterion because
blinking can continue for more than three seconds. A product list page uses the text-decoration:blink style
on an element to draw attention to sale prices. This fails the
Success Criterion because users cannot control the blink. All pages
meta
http-equiv of {time-out}; url=... is often used to
@@ -11,14 +11,14 @@
It is acceptable to use the meta element to create a redirect
when the time-out is set to zero, since the redirect is instant and will not
be perceived as a change of context. However, it is preferable to use
- server-side methods to accomplish this. See Implementing automatic redirects on the server side
+ server-side methods to accomplish this. See Implementing automatic redirects on the server side
instead of on the client side. The page below is a failure because it will redirect to the URI
http://www.example.com/newpage after a time limit of 5 seconds. HTML and XHTML
meta
http-equiv of refresh is often used to periodically refresh
@@ -9,9 +9,9 @@
readers read the page before the page refreshes unexpectedly and causes the
screen reader to begin reading at the top. Sighted users may also be
disoriented by the unexpected refresh. This is a deprecated example that changes the user's page at regular
intervals. Content developers should not use this technique to
simulate "push" technology. Developers cannot predict how much time
@@ -20,7 +20,7 @@
users to choose when they want the latest information. (The number
in the content attribute is the refresh interval in
seconds.) HTML and XHTML This failure occurs when JavaScript event handlers are attached to elements
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 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 a and area
elements are intended to mark up links. 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. 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. 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
will not be recognized as a link. The markup for the image is: 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 div element will not be
recognized as a link by assistive technology. The markup for the div element is: For all elements presented as links which use JavaScript event handlers to make the element emulate a link: HTML and XHTML The objective of this technique is to describe a failure that occurs when
structural markup is used to achieve a presentational effect, but indicates
relationships that do not exist in the content. This is disorienting to
@@ -15,14 +15,14 @@
Though an element's semantic meaning is generally exposed to AT, the WAI-ARIA presentation role can be used to suppress the native semantics of an element so that they are not mapped to the accessibility API. Setting an element's role to presentation may avoid this failure by hiding that element's semantics from the user. In this example, a heading element is used to display an address in a
large, bold font. The address does not identify a new section of the
document, however, so it should not be marked as a heading. In this example, heading markup is used in two different ways: to
convey document structure and to create visual effects. The
h1 and h2 elements are used appropriately
@@ -41,7 +41,7 @@ The following example uses blockquote for text that is
not a quotation to give it prominence by indenting it when displayed
in graphical browsers. HTML and XHTML This document describes a failure that occurs when the tab order does not
follow logical relationships and sequences in the content. Focusable elements like links and form elements have a tabindex
@@ -16,12 +16,12 @@
the content order to fall out of correspondence when the content is edited
but the tabindex attributes are not updated to reflect the
changes to the content. The following example incorrectly uses tabindex to specify an
alternative tab order: If this list is navigated by the tab key, the list is navigated in
the order Homepage, chapter 3, chapter 2, chapter 1, which does not
follow the sequence in the content. The tab order has been set explicitly in a Web page by providing
tabindex attributes for all fields. Later, the page
is modified to add a new field in the middle of the page, but the
author forgets to add a tabindex attribute to the new
field. As a result, the new field is at the end of the tab
order. HTML and XHTML The objective of this technique is to describe a failure that occurs when a
table used only for layout includes either th elements, a
summary attribute, or a caption element. This
@@ -40,16 +40,16 @@
spoken, this information does not provide value and will only distract users
navigating the content via a screen reader. Empty summary
attributes are acceptable on layout tables, but not recommended. Here is a simple example that uses a table to layout content in a
three column format. The navigation bar is in the left column, the
main content in the middle column, and an additional sidebar is on
the right. At the top is a page title. The example marks the page
title as <th>, and provides a summary
attribute indicating that the table is a layout table. HTML and XHTML The blink element, while not part of the official HTML or XHTML
specification, is supported by many user agents. It causes any text inside
the element to blink at a predetermined rate. This cannot be interrupted by
@@ -8,18 +8,18 @@
long as the page is displayed. Therefore, content that uses
blink fails the Success Criterion because blinking can continue
for more than three seconds. A product list page uses the blink element to draw
attention to sale prices. This fails the Success Criterion because
users cannot control the blink. HTML and XHTML This document describes a failure caused by use of the HTML pre
element to markup tabular information. The pre element
preserves only visual formatting. If the pre element is used to
@@ -13,9 +13,9 @@
data. Assistive technologies use the structure of an HTML table to present
data to the user in a logical manner. This structure is not available when
using the pre element. HTML and XHTML Although WCAG 2 does not prohibit the use of layout tables, CSS-based layouts are recommended in order to retain the defined semantic meaning of the HTML table elements and to conform to the coding practice of separating presentation from content. If a layout table is used, however, it is important that the content make sense when linearized.
This failure occurs when a meaningful sequence of content conveyed through
@@ -26,13 +26,13 @@
table. As a result, the meaningful sequence conveyed through visual
presentation may not be perceivable when the content is spoken by a screen
reader. An advertisement makes clever use of visual positioning, but changes
meaning when linearized. The reading order from this example would be: A Web page from a museum exhibition positions a navigation bar
containing a long list of links on the left side of the page. To the
right of the navigation bar is an image of one of the pictures from
@@ -66,7 +66,7 @@ A layout table is used to position the elements of the page. The
links in the navigation bar are split into different cells in the
leftmost column. The reading order from this example would be: Technologies that support script-controlled blinking of content. Scripts can be used to blink content by toggling the content's visibility on and off at regular intervals. It is a failure for the script not to include a mechanism to stop the blinking at 5 seconds or earlier. See Using scripts to control blinking and stop it in five seconds or less for information about how to modify the technique to stop the blinking. Scripts can be used to blink content by toggling the content's visibility on and off at regular intervals. It is a failure for the script not to include a mechanism to stop the blinking at 5 seconds or earlier. See Using scripts to control blinking and stop it in five seconds or less for information about how to modify the technique to stop the blinking. The following example uses script to blink content, but the blink
continues indefinitely rather than stopping after five seconds. For each instance of blinking content: If #1 is false, then the content fails the Success Criterion. Applies when scripting is used to open new windows. Some Web sites open a new window when a page is loaded, to advertise a
product or service. The objective of this technique is to ensure that pages
do not disorient users by opening up one or more new windows that automatically attain focus as soon as a
page is loaded. There are multiple methods by which this failure may be triggered. Two
common examples that are supported differently in various versions of
user agents are listed as examples below. The following example is commonly used in HTML 4.01 to open new
windows when pages are loaded. The following example commonly used in XHTML to open new windows when
pages are loaded. Technologies that have event handlers specific to pointing devices. User Agent and Assistive Technology Support Notes When pointing device-specific event handlers are the only mechanism available
to invoke a function of the content, users with no vision (who cannot use
devices such as mice that require eye-hand coordination) as well as users
who must use alternate keyboards or input devices that act as keyboard
emulators will be unable to access the function of the content. The following example is of an image that responds to a mouse click
to go to another page. This is a failure because the keyboard cannot
be used to move to the next page.
<p><img onmousedown="nextPage();" src="nextarrow.gif"
alt="Go to next page"></p>
Applies to all content that supports script. User Agent and Assistive Technology Support Notes Content that normally receives focus when the content is accessed by keyboard may have this focus removed by scripting. This is sometimes done when designer considers the system focus indicator to be unsightly. However, the system focus indicator is an important part of accessibility for keyboard users. In addition, this practice removes focus from the content entirely, which means that the content can only be operated by a pointing device such as a mouse. Server-side scripting languages allow developers to set the non-standard
HTTP header "Refresh" with a time-out (in seconds) and a URI to which the
browser is redirected after the specified time-out. If the time interval is
@@ -18,13 +18,13 @@
new location}. It is also possible to omit the URI and obtain a
periodically refreshing page, which causes the same problem. The HTTP header
that is set is Refresh: {time in seconds}. The following example is a failure because a timed server-side
redirect is implemented in Java Servlets or JavaServer Pages
(JSP). The following example is a failure because a timed server-side
redirect is implemented in Active Server Pages (ASP) with VBScript. HTML and XHTML This failure demonstrates how using generic HTML elements to create user
interface controls can make the controls inaccessible to assistive
technology. Assistive technologies rely on knowledge of the role and current
@@ -19,10 +19,10 @@
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. 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. The following example fails because it creates a checkbox using a span and an image. A checkbox created in this manner will not work with assistive technology since there is no information that identifies it as a checkbox. In addition, this example is also not operable from the keyboard and would fail guideline 2.1. If check #2 AND check #3 are false, the failure condition applies. General This document describes a failure that occurs when a new window is created in
response to a user filling in a text field for other than error reporting.
This is a deprecated example showing a failure: A user is filling in
his mailing address. When he fills in his postal code, a new window
opens containing advertisements for services available in his city.
This example is acceptable: A user is filling in his mailing address
in a form. When he fills in the postal code field, a script runs to
validate that it is a valid postal code. If the value is not valid,
a window opens with instructions on how to fill in the field. General This document describes a failure that occurs when the content in the main viewport viewport is automatically updated, and there there is no option for a user to disable this behavior. This document describes a failure that occurs when the content in the main viewport viewport is automatically updated, and there is no option for a user to disable this behavior. Two procedures are presented below to test for the existence of a failure against Success Criterion 3.2.5. Procedure 1 is the preferred procedure and assumes that content authors have access to the code that generates the viewport content. However there may be instances where this may not be possible (eg: in certain content management systems, application environments such as django or ruby-on-rails, or content generated through scripting languages such as AJAX or PHP that are generated by third parties.) To that end, the second procedure is supplied to allow testing in these instances. Note that timeframes are indicative only, and that any change after any amount of time should be treated as a failure if the test otherwise does not pass the other step evaluations. A news site automatically refreshes itself to ensure that it has the
newest headlines. There is no option to disable this behavior. A slideshow fills the entire viewport and advances to the next slide
automatically. There is no stop button. A search engine automatically generates results and dynamically updates content based on user input. There is no option to disable this behavior. HTML and XHTML This describes a failure condition when the context needed for understanding the purpose of a link is located in content that is not programmatically determined link context. If the context for the link is not provided in one of the following ways: then the user will not be able to find out where the link is going with any ease. If the user must leave the link to search for the context, the context is not programmatically determined link context and this failure condition occurs.
A news service lists the first few sentences of an article in a paragraph. The next paragraph contains the link "Read More...". Because the link is not in the same paragraph as the lead sentence, the user cannot easily discover what the link will let the user read more about. An audio site provides links to where its player can be downloaded. The information about what would be downloaded by the link is in the preceding row of the layout table, which is not programmatically determined context for the link. Locate links where some additional link context is needed to understand the purpose of the link. For each link: HTML and XHTML This describes a failure condition for text alternatives on images. If there is no source of text to provide an alternative for the image then assistive technologies are not able to identify the image or to convey its purpose to the user. The alt attribute continues to be the preferred way to provide alternative text for images. Appropriate WAI-ARIA attributes may be used to provide alternative text, as long as they are accessibility supported. For more information about accessibility support, see Documenting Accessibility Support. The Accessible Rich Internet Applications (WAI-ARIA) 1.0 Specification describes the Text Alternative Computation, for computing the text alternative from the HTML and WAI-ARIA attributes of an element. This describes a failure condition for text alternatives on images. If there is no source of text to provide an alternative for the image then assistive technologies are not able to identify the image or to convey its purpose to the user. The alt attribute continues to be the preferred way to provide alternative text for images. Appropriate WAI-ARIA attributes may be used to provide alternative text, as long as they are accessibility supported. For more information about accessibility support, see Documenting Accessibility Support. The Accessible Rich Internet Applications (WAI-ARIA) 1.0 Specification describes the Text Alternative Computation, for computing the text alternative from the HTML and WAI-ARIA attributes of an element.
Some Assistive Technologies attempt to compensate for the missing text alternatives by reading the file name of the image. But it is insufficient to rely simply on the file name for many reasons. For example, file names may not be descriptive (e.g., images/nav01.gif), and technology specifications do not require descriptive file names. And some Assistive Technologies do not read the file name if there is no text alternative provided via HTML attributes.
In the code example below, the person using a screen reader would not know the purpose of the image. Identify img, area and input elements of type image. For each of these elements: Applies to all technologies This describes a failure condition for all techniques involving navigation mechanisms that are repeated on multiple Web pages within a set of Web pages (Success Criterion 3.2.3). If the mechanism presents the order of links in a different order on two or more pages, then the failure is triggered.
Examples of a navigation mechanism that presents links in a different order.
Page 1 Menu
Page 2 Menu
All technologies. The objective of this technique is to describe the failure that occurs when the long description for non-text content does not serve the same purpose or does not present the same information as the non-text content. This can cause problems for people who cannot interpret the non-text content because they rely on the long description to provide the necessary information conveyed by the non-text content. Without a long description that provides complete information, a person may not be able to comprehend or interact with the Web page.
For all non-text content that requires a long description HTML controls This failure describes a problem that occurs when a form control does not have a name exposed to assistive technologies. The result is that some users will not be able to identify the purpose of the form control. The name can be provided in multiple ways, including the label element. Other options include use of the title attribute and aria-label which are used to directly provide text that is used for the accessibility name or aria-labelledby which indicates an association with other text on a page that is providing the name. Button controls can have a name assigned in other ways, as indicated below, but in certain situations may require use of label, title, aria-label, or aria-labelledby. Elements that can use an explicitly-associated label element are: The following example demonstrates a form that visually presents labels for form controls, but does not use the label element to associate them with their controls. The code example below is a failure because assistive technology may not be able to determine which label goes with which control. In the following code example, label elements are present, but they are not programmatically linked to the corresponding input controls and may therefore not be properly determined by assistive technology. The search text box in the following code example does not have a programmatically determinable name. The name can be supplied with any of the approaches mentioned above. For all input, textarea and select elements in the Web page (except inputs of type hidden, submit, reset, or button: HTML, XHTML and CSS The objective of this failure condition is to describe a problem that occurs when changing the size of text causes text to be clipped, truncated, or obscured, so that it is no longer available to the user. In general, this failure occurs when there is no way for a user agent's layout engine to honor all the layout hints in the HTML at the new font size. Some of the ways in which this can occur include: The Working Group has discovered many misunderstandings about how to test this failure. We are planning to revise this failure in a future update. Until then, if the content passes the success criterion using any of the listed sufficient techniques, then it does not meet this failure. The font size is set in a scalable way, but the container is set to a fixed pixel size. A gray border shows the boundaries of the text container. When the text is resized, it spills out of its container, and obsures the next paragraph. Illustration of example 1: This example is identical to the last one, except that the container is set to clip the text. The text is no longer bleeding into the next paragraph, but now it is truncated. This is also a failure. Illustration of example 2: The Working Group has discovered many misunderstandings about how to test this failure. We are planning to revise this failure in a future update. Until then, if the content passes the success criterion using any of the listed sufficient techniques, then it does not meet this failure. Technologies that support blinking content within an object, applet, or a
plug-in. When content that is rendered by a plug-in or contained in an applet blinks,
there may be no way for the user agent to pause the blinking. If neither the
plug-in, applet, nor the content itself provides a mechanism to pause the
content, the user may not have sufficient time to read the content between
blinks or it may be so distracting that the user will not be able to read
other content on the page. For each page that has blinking content in a plugin or applet: Markup languages: HTML, XHTML, and other SGML or XML-based technologies. The objective of this failure is to identify examples of markup errors in element tags that could cause assistive technology to be unable to generate a satisfactory model of the page. Different user agents may implement different heuristics to recover from errors, resulting in inconsistent presentations of the page between user agents. Some common types of problems with start and end tags that lead to this failure condition (though this is not an exhaustive list): The following code fails because the opening tag is missing an angle bracket, and the intended boundary of the tag is unclear. The following code fails because the closing tag is missing the slash, making it look like it is in fact another opening tag. The following code fails because the attribute value is missing the closing quote, which makes the boundary of the attribute-value pair unclear. The following code fails because the there is not whitespace between attributes, which makes the boundary between attribute-value pairs unclear. The following code fails because an attribute value is not quoted and contains whitespace, which makes the boundary of the attribute-value pair unclear. The following code fails because the closing tag of the first paragraph is missing, making it unclear whether the second paragraph is a child or sibling of the first. Any technology. The objective of this failure condition is to avoid substituting characters whose glyphs look similar to the intended character, for that intended character. The Unicode character set defines thousands of characters, covering dozens of writing systems. While the glyphs for some of these characters may look like the glyphs for other characters in visual presentation, they are not processed the same by text-to-speech tools. For example, the characters U+0063 and U+03F2 both look like the letter "c", yet the first is from the Western alphabet and the second from the Greek alphabet and not used in Western languages. The characters U+0033 and U+04E0 both look like the number "3", yet the second is actually a letter from the Cyrillic alphabet. This failure also applies to the use of character entities. It is the incorrect character used because of its glyph representation that comprises a failure, not the mechanism by which that character is implemented. The following word looks, in browsers with appropriate font support, like the English word "cook", yet is composed of the string U+03f2 U+043E U+03BF U+006B, only one of which is a letter from the Western alphabet. This word will not be processed meaningfully, and a text alternative is not provided. The following example, like the one above, will look like the English word "cook" when rendered in browsers with appropriate font support. In this case, the characters are implemented with character entities, but the word will still not be processed meaningfully, and a text alternative is not provided. Working Example: "ϲоοk" Any technology. The objective of this failure condition is to avoid the use of ASCII art when a text alternative is not provided. Although ASCII art is implemented as a character string, its meaning comes from the pattern of glyphs formed by a visual presentation of that string, not from the text itself. Therefore ASCII art is non-text content and requires a text alternative. Text alternatives, or links to them, should be placed near the ASCII art in order to be associated with it. The objective of this failure condition is to avoid the use of ASCII art when a text alternative is not provided. Although ASCII art is implemented as a character string, its meaning comes from the pattern of glyphs formed by a visual presentation of that string, not from the text itself. Therefore ASCII art is non-text content and requires a text alternative. Text alternatives, or links to them, should be placed near the ASCII art in order to be associated with it. The following ASCII art chart lacks a text alternative and therefore does not meet Success Criterion 1.1.1. Note this failure example does in fact cause this page to fail, but you may skip over the example. Any technology. The objective of this failure is to avoid situations in which people who cannot perceive color differences cannot identify links (when people with color vision can identify links). Link underlines or some other non-color visual distinction are required (when the links are discernible to those with color vision). While some links may be visually evident from page design and context, such as navigational links, links within text are often visually understood only from their own display attributes. Removing the underline and leaving only the color difference for such links would be a failure because there would be no other visual indication (besides color) that it is a link. If the non-color cue only happens when the mouse hovers over the link or when the link receives focus, it is still a failure. If the link is a different color and bold it would not fail because the boldness is not color dependent. A Web page includes a large number of links within the body text. The links are styled so that they do not have underlines and are very similar in color to the body text. This would be a failure because users would be unable to differentiate the links from the body text. The following code is an example of removing the underline from a link in a sentence or paragraph without providing another visual cue besides color. If the visual cue is only provided on hover (as in the example above), it would still fail.
Pages that provide synchronized media alternatives to text. The objective of this failure is to avoid situations in which synchronized media alternatives are not labeled with the text for which they are alternatives. Synchronized media alternatives provide enhanced access to users for whom synchronized media is a more effective format than text. Since they are alternatives to text, they do not need themselves to have redundant text alternatives. However, they need to be clearly labeled with the text for which they substitute, so users can find them and so users who normally expect text alternatives to synchronized media know not to look for them. A page with instructions to complete a tax form provides a prose description of the fields to complete, data to provide, etc. Additionally, a synchronized media alternative provides spoken instructions, with video of a person completing the section being discussed in the audio. Although both versions are provided on the page, the synchronized media version is provided elsewhere on the page and is not clearly labeled with the part of the text for which it is a substitute. This makes it difficult for users encountering the text to find it, and users encountering the video do not know where its text alternative is. Any technology. The objective of this failure is to avoid situations in which synchronized media alternatives provide more information than the text for which they are alternatives, but do not provide their own text alternatives to provide access to the extra information. Synchronized media alternatives provide enhanced access to users for whom synchronized media is a more effective format than text. Since they are alternatives to text, they do not need themselves to have redundant text alternatives in the form of captions, audio descriptions or full text alternatives. However, if they provide more information than the text for which they are an alternative, then they are not just alternatives but are synchronized media content in their own right. In this case they are subject to the full requirements of Success Criterion 1.2.2 to provide captions and to Success Criterion 1.2. and 1.2.5. The objective of this failure is to avoid situations in which synchronized media alternatives provide more information than the text for which they are alternatives, but do not provide their own text alternatives to provide access to the extra information. Synchronized media alternatives provide enhanced access to users for whom synchronized media is a more effective format than text. Since they are alternatives to text, they do not need themselves to have redundant text alternatives in the form of captions, audio descriptions or full text alternatives. However, if they provide more information than the text for which they are an alternative, then they are not just alternatives but are synchronized media content in their own right. In this case they are subject to the full requirements of Success Criterion 1.2.2 to provide captions and to Success Criterion 1.2.3 and 1.2.5. HTML5, and any XML-based markup languages including HTML 4 and SVG This describes a failure condition where duplicate ID errors are known to cause problems for assistive technologies when they are trying to interact with content. Duplicate values of type ID can be problematic for user agents that rely on this attribute to accurately convey relationships between different parts of content to users. For example, a screen reader may use ID values to identify the applicable header content for a data cell within a data table, or an input control to which a given label applies. If these values are not unique, the screen reader will be unable to programmatically determine which headers are associated with the data cell or which control is associated with which label or name. Checking that ID attribute values are unique within a document can be done by validating the document against its specification, because the specification defines which attributes contain document-wide unique identifiers. In most markup languages, ID values are attribute values, for example in HTML and SVG. XML documents that use only the xml:id attribute as an ID attribute, parsing the XML document with a validating parser that supports the xml:id specification is sufficient. XML documents that use only the xml:id attribute as an ID attribute, parsing the XML document with a validating parser that supports the xml:id specification is sufficient. An author uses an online validation service to check that all id attribute values are unique. A developer utilizes features in their authoring tool to ensure that id attribute values are unique. Any technology This describes a failure condition that occurs when the user agent's default visual indication of keyboard focus is turned off or rendered non-visible by other styling on the page without providing an author-supplied visual focus indicator. Turning off the focus indicator instructs the user agent not to present the focus indicator. Other styling may make it difficult to see the focus indicator even though it is present, such as outlines that look the same as the focus outline, or thick borders that are the same color as the focus indicator so it cannot be seen against them. The following CSS example will remove the default focus indicator, which fails the requirement to provide a visible focus indicator. The following CSS example will create an outline around links that looks the same as the focus indicator. This makes it impossible for users to determine which one in fact has the focus, even though the user agent does draw the focus indicator. The following CSS example creates a border around links that does not have enough contrast for the focus indicator to be seen when drawn on top of it. In this case the focus indicator is drawn just ouside the border, but as both are black and the border is thicker than the focus indicator, it no longer meets the definition of "visible". All technologies Whether a user interface component has focus is a particularly important facet of its state. Many types of assistive technology rely on tracking the current keyboard focus. Screen readers will move the user's point of regard to the focused user interface component, and screen magnifiers will change the display of the content so that the focused component is visible. If assistive technology is not notified when focus moves to a new component, the user will become confused when they attempt to interact with the wrong component. While user agents usually handle this functionality for standard controls, custom-scripted user interface components are responsible for using accessibility APIs to make focus information and notifications available. A custom menu displays menu items by rendering them explicitly, handling mouse and key events directly and highlighting the currently selected menu item. The programmer does not expose the menu item that has focus via the Accessibility API, so assistive technology can only determine that focus is somewhere within the menu and cannot determine which menu item has focus. Applies to all technologies. This describes a failure condition for all techniques involving captions. If
the "caption" does not include all of the dialogue (either verbatim or in
essence) as well as all important sounds then the 'Captions' are not real
@@ -10,18 +10,18 @@
NOTE: Captions sometimes simplify the spoken text both to make it easier to
read and to avoid forcing the viewer to read at very high speed. This is
standard procedure and does not invalidate a caption. Examples of text streams that are not captions include: HTML, XHTML, and CSS The objective of this failure condition is to describe a problem that occurs when changing the size of text does not cause the text-based form controls to resize accordingly. This means that the user may have difficulty entering text and being able to read what they have entered because the text is not displayed at the text size required by the user. Text-based form controls include input boxes (text and textarea) as well as buttons. A Contact Us form has some introductory information and then form controls for users to enter their first name, last name, telephone number and email address. The heading, introductory text and form control labels have been implemented in a scalable way but the form controls themselves have not. The XHTML component: The CSS component: All technologies This objective of this technique is to describe the failure that occurs when a required field or an error field is marked with color differences only, without an alternate way to identify the required field or error field. This can cause problems for people who are blind or colorblind, because they may not be able to perceive the color differences that indicate which field is required or which field is causing an error. In both examples, the color could be used without failure if the text was sufficiently different in visual presentation (e.g. bold or in a different font) that it would be easily differentiated from the surrounding text if the color were removed. It would also not fail if the color chosen had sufficient luminosity difference (lightness) from the other text that it would be easily be seen as different if viewed in black and white. In these cases - the information would not be displayed in color (hue) alone but also in "presentation" or "lightness" respectively. For all required fields or error fields in the Web page that are identified using color differences: Any technology This failure ensures that people with visual or cognitive disabilities will recognize phone number fields and understand what information to provide to fill in the fields. Phone numbers are frequently formatted in fixed, distinctive ways, and authors may feel that just providing visual formatting of the fields will be sufficient to identify them. However, even if all the fields have programmatically determined names, a text label must also identify the set of fields as a phone number. In the United States, phone numbers are broken into a three digit area code, a three digit prefix, and a four digit extension. A web page creates fixed length text input fields for the three parts of the phone number, surrounding the first field with parenthesis and separating the second and third fields with a dash. Because of this formatting, some users recognize the fields as a phone number. However, there is no text label for the phone number on the web page. This is because the label for each field will be the closest preceding text, so the three fields would be labeled "(", ")" , and "-" respectively. Any technology This failure occurs when people with low vision are not able to read text that is displayed over a background image. When there is not sufficient contrast between the background image and the text, features of the background image can be confused with the text making it difficult to accurately read the text. To satisfy Success Criterion 1.4.3 and 1.4.6, there must be sufficient contrast between the text and its background. For pictures, this means that there would need to be sufficient contrast between the text and those parts of the image that are most like the text and behind the text. Black text overlays an image with black lines. The lines cross behind the letters making F's look like E's etc. Black text overlays an image with with dark gray areas. Wherever the text crosses a dark gray area the contrast is so bad that the text cannot be read. Black text overlays an image with dark gray areas. Wherever the text crosses a dark gray area the contrast is so bad that the text cannot be read. HTML and XHTML This failure describes a common condition where links such as "click here" or "more" are used as anchor elements where you need to have the surrounding text to understand their purpose and where there isn't any mechanism to make the destination clear by itself, such as a button to expand the link text. Many blind people who use screen readers call up a dialog box that has a list of links from the page. They use this list of links to decide where they will go. But if many of the links in that list simply say "click here" or "more" they will be unable to use this feature in their screen reader, which is a core navigation strategy. That's why it's a failure of 2.4.9 to not provide any way of allowing them to know the destination from the link text alone. It is also true for people who tab through links. If all they hear as they tab through the document is "click here, click here, click here etc." they will become confused. All technologies. This describes the failure condition that results when a Web page opens a dialog or menu interface component embedded on the page in a way that makes it difficult for a keyboard user to operate because of its position in the sequential navigation order. When the user opens the dialog or menu embedded on the page by activating a button or link, his next action will be to interact with the dialog or menu. If focus is not set to the dialog or menu, and it is not adjacent to the trigger control in the sequential navigation order, it will be difficult for the keyboard user to operate the dialog or menu. When a DHTML menu or dialog is activated, it is created dynamically, positioned visually near the trigger, and appended to the end of the DOM. Because it is appended to the end of the DOM, it is at the end of the sequential navigation order. The user must tab through the rest of the web page before he can interact with the dialog or menu. When a menu is dismissed, it is removed or hidden from the web page and focus is set to the document. The user must tab from the beginning of the navigation sequence to reach the point from which the menu was opened. For each menu or dialog embedded on a Web page that is opened via a trigger control: General This describes a failure condition of Success Criterion 4.1.2 where some or all of the parts of multi-part form field do not have names. Often there is a label for the multi-part field, which is either programatically associated with the first part, or not programatically associated with any parts. A name does not necessarily have to be visible, but is visible to assistive technologies. A US telephone number consists of a 3-digit area code, a 3-digit prefix, and a 4-digit suffix. They are typically formatted as follows ([area code]) [prefix]-[suffix], such as (206) 555-1212. Often, forms asking for a telephone number will include 3 separate fields, but with a single label, such as: The failure occurs when there is not a name for each of the 3 fields in the Accessibility API. A user with assistive technology will experience these as three undefined text fields. Some assistive technologies will read the punctuation as identification for the text fields, which can be even more confusing. In the case of a 3-field US phone number, some assistive technologies would name the fields "(", ")" and "-", which is not very useful. The same US telephone number. In this case, the label is not programatically associated with any of the parts. A user with assistive technology will experience these as three undefined text fields. The same US telephone number. In this case, the label is programatically associated with the first part. A user with assistive technology will be led to believe that the first field is for the entire phone number, and will experience the second and third fields as undefined text fields. For each subfield in the multi-part form field: All technologies that support CSS. The CSS :before and :after pseudo-elements specify the location of content before and after an element's document tree content. The content property, in conjunction with these pseudo-elements, specifies what is inserted. For users who need to customize or turn off style information in order to view content according to their needs, assistive technologies may not be able to access the information that is inserted using CSS. Therefore, it is a failure to use these properties to insert non-decorative content. In the following example, :before and :after are used to indicate speaker changes and to insert quotation marks in a screenplay. The CSS contains: It is used in this excerpt: In this example, :before is used to differentiate facts from opinions. The CSS contains: It is used in this excerpt: All technologies. Many people with cognitive disabilities have a great deal of trouble with blocks of text that are justified (aligned to both the left and the right margins). The spaces between words create "rivers of white" running down the page, which can make the text difficult for some people to read. This failure describes situations where this confusing text layout occurs. The best way to avoid this problem is not to create text layout that is fully justified (aligned to both the left and the right margins). In the following example of a failure, the HTML align attribute is used to create justified text. In this example of a failure, the CSS text-align property is used to create justified text. Content that contains links. This failure condition occurs when a link contains only non-text content, such as an image, and that link cannot be identified by an accessible name. The accessible name for a link is defined according to the Accessible Name Calculation. This also applies when both text and images are used separately on a page to link to the same target. In this case success technique H2: Combining adjacent image and text links for the same resource is the recommended approach to reduce the number of separate links and the undesirable redundancy. This failure condition occurs when a link contains only non-text content, such as an image, and that link cannot be identified by an accessible name. The accessible name for a link is defined according to the Accessible Name Calculation. This also applies when both text and images are used separately on a page to link to the same target. In this case success technique H2: Combining adjacent image and text links for the same resource is the recommended approach to reduce the number of separate links and the undesirable redundancy. A search site returns search results that include both a text link and an image link to the match site. The image has a null alt attribute, since the result already contains a link with a text description. However, the screen reader does not ignore the image link but uses heuristics to find some text that might describe the purpose of the link. For example, the screen reader might announce, "football dot gif Football Scorecard." General. This document describes a failure that occurs when removing focus from a form
element, such as by moving to the next element, causes a change of context.
The user is going through the form filling out the fields in order.
When he moves from the third field to the forth, the form submits.
HTML and XHTML. One way for authors to explicitly associate header cells to data cells is by using the id and headers attributes. These allow the author to associate multiple header cells to a particular data cell, which can be necessary when complex data tables with more than one level of heading are used. The failure occurs when the relationship between data cells and corresponding header cells cannot be programmatically determined correctly because the association of id and headers attributes is faulty. This can happen, for example, when copying code within tables and forgetting to update the code. Note: The example below is based on the complex data table presented as example 1 of Technique H43: Using id and headers attributes to associate data cells with header cells in data tables.
+ Note: The example below is based on the complex data table presented as example 1 of Technique H43: Using id and headers attributes to associate data cells with header cells in data tables.
In this example, nested headers are used, but the content cells are incorrectly associated via the id and headers attributes. All cells reference top level header 'Exams' (id="e") - this isn't correct for the last three columns which should reference header 'Projects'. Also, the referencing of the second level column headers has been accidentally swapped even though in this example this makes no difference as the contents (1, 2, Final) are repeated.
Example Code: These steps are illustrated in the screenshots below
-
+
-
+ ` element. Elements with `class="instructions"` provide information about populating the template. They should be removed as the technique is developed but if not removed, will be ignored by the generator. **Do not copy `class="instructions"` on real content.**
+
+The generator used to publish techniques uses XML processing, so techniques must be well-formed XML. Techniques use HTML 5 structure so are actually [HTML Polyglot](https://www.w3.org/TR/html-polyglot/).
+
+### Images, Examples, Cross References for Techniques
+
+Techniques can include images. Place the image file in the `img` folder of the relevant technology - meaning all techniques for a technology share a common set of images. Use a relative link to load the image. Most images should be loaded with a `
WCAG 2 Layers of Guidance
WCAG 2.1 Supporting Documents
-
WCAG 2.1 Supporting Documents
Requirements for WCAG 2.1
- Comparison with WCAG 2.0
@@ -113,7 +113,7 @@ New Features in WCAG 2.1
Numbering in WCAG 2.1
- Conformance to WCAG 2.1
@@ -362,7 +362,7 @@ Input Assistance
Robust
- Compatible
@@ -379,7 +379,8 @@ Compatible
Conformance
- Interpreting Normative Requirements
@@ -410,7 +411,7 @@ Full pages
Complete processes
Only Accessibility-Supported Ways of Using Technologies
- Non-Interference
Required Components of a Conformance Claim
Optional Components of a Conformance Claim
Glossary
Change Log
Content on Hover or Focus
-
Reflow
Using the aria-describedby property to provide a descriptive label for user interface controls
When to Use
- Description
- Using the aria-describedby property to provide a descriptive label for user interface controls
When to Use
+ Description
+ Examples
+ Examples
Example 1: Using aria-describedby property to describe a Close button's action
- Description
+ Using aria-describedby property to describe a Close button's action
+
<button aria-label="Close" aria-describedby="descriptionClose"
onclick="myDialog.close()">X</button>
@@ -19,13 +19,13 @@
- Example 1: Using aria-describedby property to describe a Close button's acti
<div id="descriptionClose">Closing this window will discard any information entered and
return you back to the main page</div>
Example 2: Using aria-describedby to associate instructions with form fields
- Description
+ Using aria-describedby to associate instructions with form fields
+
<form>
<label for="fname">First name</label>
@@ -33,11 +33,11 @@
- Example 2: Using aria-describedby to associate instructions with form fields
<p id="int2">A bit of instructions for this field linked with aria-describedby. </p>
</form>
Example 3: Using aria-describedby property to provide more detailed information about the button
- Description
+ Using aria-describedby property to provide more detailed information about the button
+
<p><span id="fontDesc">Select the font faces and sizes to be used on this page</span>
<button id="fontB" onclick="doAction('Fonts');" aria-describedby="fontDesc">Fonts</button>
</p>
@@ -48,11 +48,11 @@
- Example 3: Using aria-describedby property to provide more detailed informat
<button id="customB" onclick="doAction('Customize');" aria-describedby="customDesc">Customize</button>
</p>
Example 4: Using aria-describedby to associate tooltips with form fields
- Description
+ Using aria-describedby to associate tooltips with form fields
+
<html lang="en-us">
<head>
@@ -84,16 +84,16 @@
Example 4: Using aria-describedby to associate tooltips with form fields
- Example 5: XHTML
- Description
+ XHTML
+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+ARIA 1.0//EN"
-"http://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd">
+"https://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
@@ -129,12 +129,12 @@
Example 5: XHTML
Example 6: HTML
- Description
+ HTML
+
<html lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
@@ -206,7 +206,7 @@
Example 6: HTML
</body>
Tests
+ Tests
Procedure
Example 6: HTML
Resources
+ Resources
diff --git a/techniques/aria/ARIA10.html b/techniques/aria/ARIA10.html
index ac9aaebb87..a0e4267dc3 100644
--- a/techniques/aria/ARIA10.html
+++ b/techniques/aria/ARIA10.html
@@ -1,11 +1,11 @@
-Using aria-labelledby to provide a text alternative for non-text content
When to Use
- Description
+Using aria-labelledby to provide a text alternative for non-text content
When to Use
+ Description
Examples
+ Examples
Example 1: Providing a short description for a complex graphic
- Description
+ Providing a short description for a complex graphic
+
<div role="img" aria-labelledby="star_id">
<img src="fullstar.png" alt=""/>
@@ -16,11 +16,11 @@
- Example 1: Providing a short description for a complex graphic
</div>
<div id="star_id">4 of 5</div>Tests
+ Tests
Procedure
Example 1: Providing a short description for a complex graphic
Resources
+ Resources
diff --git a/techniques/aria/ARIA11.html b/techniques/aria/ARIA11.html
index 3cc6ce0efc..daa245b34d 100644
--- a/techniques/aria/ARIA11.html
+++ b/techniques/aria/ARIA11.html
@@ -1,6 +1,6 @@
-Using ARIA landmarks to identify regions of a page
When to Use
- Description
+Using ARIA landmarks to identify regions of a page
When to Use
+ Description
Examples
+ Examples
Example 1: Simple landmarks
- Description
+ Simple landmarks
+
<div id="header" role="banner">A banner image and introductory title</div>
<div id="sitelookup" role="search">....</div>
@@ -44,11 +44,11 @@
- Example 1: Simple landmarks
<div id="content" role="main"> ... Ottawa is the capital of Canada ...</div>
<div id="rightsideadvert" role="complementary">....an advertisement here...</div>
<div id="footer" role="contentinfo">(c)The Freedom Company, 123 Freedom Way, Helpville, USA</div>Example 2: Multiple landmarks of the same type and aria-labelledby
- Description
+ Multiple landmarks of the same type and aria-labelledby
+
Example 2: Multiple landmarks of the same type and aria-labelledby
<div id="rightnav" role="navigation" aria-labelledby="rightnavheading">
<h2 id="rightnavheading">Related topics</h2>
<ul><li>...a list of links here ...</li></ul></div>
- Example 3: Multiple landmarks of the same type and aria-label
- Description
+ Multiple landmarks of the same type and aria-label
+
<div id="leftnav" role="navigaton" aria-label="Primary">
<ul><li>...a list of links here ...</li></ul> </div>
<div id="rightnav" role="navigation" aria-label="Secondary">
<ul><li>...a list of links here ...</li> </ul></div>
- Example 4: Search form
- Description
+ Search form
+
<form role="search">
<label for="s6">search</label><input id="s6" type="text" size="20">
...
</form>
- Tests
+ Tests
Procedure
-
Example 4: Search form
Resources
+ Resources
Using role=heading to identify headings
When to Use
- Description
+Using role=heading to identify headings
When to Use
+ Description
Examples
+ Examples
Example 1: Simple headings
- Description
+ Simple headings
+
<div role="heading">Global News items</div>
@@ -26,11 +26,11 @@
- Example 1: Simple headings
<div role="heading">Local News items</div>
... a list of local news, with editorial comment ...Example 2: Additional heading levels
- Description
+ Additional heading levels
+
...
<h5>Fruit Trees</h5>
@@ -40,9 +40,9 @@
- Example 2: Additional heading levels
...
<div role="heading" aria-level="7">Jonagold/div>
<p>Jonagold is a cross between the Golden Delicious and Jonathan varieties...</p>Tests
+ Tests
Procedure
Example 2: Additional heading levels
Resources
+ Resources
diff --git a/techniques/aria/ARIA13.html b/techniques/aria/ARIA13.html
index 760fbc0cf7..b826afa0b5 100644
--- a/techniques/aria/ARIA13.html
+++ b/techniques/aria/ARIA13.html
@@ -1,27 +1,27 @@
-Using aria-labelledby to name regions and landmarks
When to Use
- Description
+Using aria-labelledby to name regions and landmarks
When to Use
+ Description
Examples
+ Examples
Example 1: Identify a landmark with on-page text
- Description
+ Identify a landmark with on-page text
+
<p role="complementary" aria-labelledby="hdr1">
<h1 id="hdr1">
Top News Stories
</h1>
</p>
- Example 2: Identification for Application landmarks
- Description
+ Identification for Application landmarks
+
<div role="application" aria-labelledby="p123" aria-describedby="info">
<h1 id="p123">Calendar<h1>
@@ -31,12 +31,12 @@
- Example 2: Identification for Application landmarks
<div role="grid">
....
</div>Tests
+ Tests
Procedure
-
Example 2: Identification for Application landmarks
Resources
+ Resources
diff --git a/techniques/aria/ARIA14.html b/techniques/aria/ARIA14.html
index 2358fe71cb..d948ed9460 100644
--- a/techniques/aria/ARIA14.html
+++ b/techniques/aria/ARIA14.html
@@ -1,38 +1,38 @@
-Using aria-label to provide an invisible label where a visible label cannot be used
When to Use
- Description
+Using aria-label to provide an invisible label where a visible label cannot be used
When to Use
+ Description
Examples
+ Examples
Example 1: A close button (X) in a pop-up box
- Description
+ A close button (X) in a pop-up box
+
<div id="box">
This is a pop-up box.
<button aria-label="Close" onclick="document.getElementById('box').style.display='none';" class="close-button">X</button>
</div>
- Example 2: A phone number with multiple fields
- Description
+ A phone number with multiple fields
+
<div role="group" aria-labelledby="groupLabel">
<span id="groupLabel>Work Phone</span>
+<input type="number" aria-label="country code">
<input type="number" aria-label="area code">
<input type="number" aria-label="subscriber number">
</div>
- Tests
+ Tests
Procedure
Example 2: A phone number with multiple fields
Resources
+ Resources
diff --git a/techniques/aria/ARIA15.html b/techniques/aria/ARIA15.html
index 91753e5d26..b2b38c4b4e 100644
--- a/techniques/aria/ARIA15.html
+++ b/techniques/aria/ARIA15.html
@@ -1,24 +1,24 @@
-Using aria-describedby to provide descriptions of images
When to Use
- Description
+Using aria-describedby to provide descriptions of images
When to Use
+ Description
Examples
+ Examples
Example 1: Describing an image
- Description
+ Describing an image
+
<img src="ladymacbeth.jpg" alt="Lady MacBeth" aria-describedby="p1">
<p id="p1">This painting dates back to 1730 and is oil on canvas. It was created by
Jean-Guy Millome, and represents ...</p>
- Tests
+ Tests
Procedure
Example 1: Describing an image
Resources
+ Resources
diff --git a/techniques/aria/ARIA16.html b/techniques/aria/ARIA16.html
index d633a1a85f..ea622dfd81 100644
--- a/techniques/aria/ARIA16.html
+++ b/techniques/aria/ARIA16.html
@@ -1,6 +1,6 @@
-Using aria-labelledby to provide a name for user interface controls
When to Use
- Description
+Using aria-labelledby to provide a name for user interface controls
When to Use
+ Description
Examples
+ Examples
Example 1: Labelling a simple text field
- Description
+ Labelling a simple text field
+
<input name="searchtxt" type="text" aria-labelledby="searchbtn">
<input name="searchbtn" id="searchbtn" type="submit" value="Search">
- Example 2: Labelling a slider
- Description
+ Labelling a slider
+
<p>Please select the <span id="mysldr-lbl">number of days for your trip</span></p>
<div id="mysldr" role="slider" aria-labelledby="mysldr-lbl"></div>
- Example 3: A label from multiple sources
- Description
+ A label from multiple sources
+
<label id="l1" for="f3">Notify me</label>
@@ -47,9 +47,9 @@
Example 3: A label from multiple sources
<span id="l2" tabindex="-1">days in advance</span>Tests
+ Tests
Procedure
Example 3: A label from multiple sources
Resources
+ Resources
diff --git a/techniques/aria/ARIA17.html b/techniques/aria/ARIA17.html
index 329fc866dc..ffaa7ab550 100644
--- a/techniques/aria/ARIA17.html
+++ b/techniques/aria/ARIA17.html
@@ -1,14 +1,14 @@
-Using grouping roles to identify related form controls
When to Use
- Description
+Using grouping roles to identify related form controls
When to Use
+ Description
Examples
+ Examples
Example 1: Social Security Number
- Description
+ Social Security Number
+
<div role="group" aria-labelledby="ssn1">
<span id="ssn1">Social Security#</span>
@@ -17,12 +17,12 @@
- Example 1: Social Security Number
<input size="2" type="text" aria-required="true" title="Next 2 digits" />-
<input size="4" type="text" aria-required="true" title="Last 4 digits" />
</div>Example 2: Identifying radio groups
- Description
+ Identifying radio groups
+
<h3>Set Alerts for your Account</h3>
<div role="radiogroup" aria-labelledby="alert1">
@@ -52,10 +52,10 @@
Example 2: Identifying radio groups
div[role=radiogroup] {
border: black thin solid;
}
- Tests
+ Tests
Procedure
Example 2: Identifying radio groups
Resources
+ Resources
diff --git a/techniques/aria/ARIA18.html b/techniques/aria/ARIA18.html
index 18add5a4cd..75897b4f79 100644
--- a/techniques/aria/ARIA18.html
+++ b/techniques/aria/ARIA18.html
@@ -1,6 +1,6 @@
-Using aria-alertdialog to Identify Errors
When to Use
- Description
+Using aria-alertdialog to Identify Errors
When to Use
+ Description
@@ -19,10 +19,10 @@
Examples
+ Examples
Example 1: Alert dialog
- Description
+ Alert dialog
+
<div role="alertdialog" aria-labelledby="alertHeading" aria-describedby="alertText">
<h1 id="alertHeading">Error</h1>
@@ -30,10 +30,10 @@
- Example 1: Alert dialog
<button>Save and Continue</button>
<button>Return to page and correct error</button>
</div>Tests
+ Tests
Procedure
Example 1: Alert dialog
Resources
+ Resources
diff --git a/techniques/aria/ARIA19.html b/techniques/aria/ARIA19.html
index d321b1230a..be165b9ed3 100644
--- a/techniques/aria/ARIA19.html
+++ b/techniques/aria/ARIA19.html
@@ -1,13 +1,13 @@
-Using ARIA role=alert or Live Regions to Identify Errors
When to Use
- Description
+Using ARIA role=alert or Live Regions to Identify Errors
When to Use
+ Description
Examples
+ Examples
Example 1: Injecting error messages into a container with role=alert already present in the DOM
- Description
+ Injecting error messages into a container with role=alert already present in the DOM
+
Example 1: Injecting error messages into a container with role=alert already
<input type="submit" name="button" id="button" value="Submit">
</p>
</form>
-
Tests
+ Tests
Procedure
Example 1: Injecting error messages into a container with role=alert already
Resources
+ Resources
Identifying a required field with the aria-required property
When to Use
- Description
+Identifying a required field with the aria-required property
When to Use
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
<form action="#" method="post" id="login1" onsubmit="return errorCheck1()">
@@ -29,11 +29,11 @@
- Example 1:
</p>
</form> Example 2:
- Description
+
+
<form action="#" method="post" id="step1" onsubmit="return errorCheck2()">
@@ -65,11 +65,11 @@
- Example 2:
<input type="submit" value="Next Step" id="step_btn" name="step_btn" />
</p>
</form> Example 3:
- Description
+
+
@@ -95,18 +95,18 @@
- Example 3:
content: url('/iconStar.gif');
}
Example 4: A required text input field in XHTML
- Description
+ A required text input field in XHTML
+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1
For Accessible Adaptable Applications//EN"
- "http://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd">
+ "https://www.w3.org/WAI/ARIA/schemata/xhtml-aria-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head>
@@ -130,13 +130,13 @@
Example 4: A required text input field in XHTML
Example 5: Adding aria-required property via script
- Description
+ Adding aria-required property via script
+
<head>
<script type="text/javascript">
//<![CDATA[
@@ -173,7 +173,7 @@
Example 5: Adding aria-required property via script
</body>
Tests
+ Tests
Procedure
@@ -186,14 +186,14 @@
Example 5: Adding aria-required property via script
Resources
+ Resources
Using the region role to identify a region of the page
When to Use
- Description
-Using the region role to identify a region of the page
When to Use
+ Description
+Examples
+ Examples
Example 1: Region on a news website
- Description
+ Region on a news website
+
<div role="region" aria-labelledby="pollhead">
@@ -28,11 +28,11 @@
- Example 1: Region on a news website
</div>
Example 2: Identifying a region on a banking site
- Description
+ Identifying a region on a banking site
+
<ol>
@@ -50,20 +50,20 @@
- Example 2: Identifying a region on a banking site
</ol>
Example 3: Identifying a portlet with a generic region
- Description
+ Identifying a portlet with a generic region
+
<div role="region" aria-label="weather portlet">
...
</div>
Tests
+ Tests
Procedure
@@ -77,15 +77,15 @@
Example 3: Identifying a portlet with a generic region
Resources
+ Resources
diff --git a/techniques/aria/ARIA21.html b/techniques/aria/ARIA21.html
index ec233aaea3..5e94464ce4 100644
--- a/techniques/aria/ARIA21.html
+++ b/techniques/aria/ARIA21.html
@@ -1,6 +1,6 @@
-Using Aria-Invalid to Indicate An Error Field
When to Use
- Description
+Using Aria-Invalid to Indicate An Error Field
When to Use
+ Description
Examples
+ Examples
Example 1: Using aria-invalid on required fields
- Description
+ Using aria-invalid on required fields
+
@@ -59,12 +59,12 @@
-
- Example 1: Using aria-invalid on required fields
</p>
</form>
</code> Example 2: Identifying errors in data format
- Description
+ Identifying errors in data format
+
@@ -100,10 +100,10 @@
-
- Example 2: Identifying errors in data format
background-repeat:no-repeat; background-position:right;
}
Tests
+ Tests
Procedure
@@ -117,18 +117,18 @@
Example 2: Identifying errors in data format
Resources
+ Resources
Using role=status to present status messages
+ Metadata
+ When to Use
+ Description
+ status
role from the ARIA specification to notify Assistive Technologies (AT) when content has been updated with information about the user's or application's status. This is done by adding role="status"
to the element that contains the status message. The aria live region role of status
has an implicit aria-live
value of polite
, which allows a user to be notified via AT (such as a screen reader) when status messages are added. The role of status
also has a default aria-atomic
value of true
, so that updates to the container marked with a role of status
will result in the AT presenting the entire contents of the container to the user, including any author-defined labels (or additional nested elements). Such additional context can be critical where the status message text alone will not provide an equivalent to the visual experience. The content of the aria-live container is automatically read by the AT, without the AT having to focus on the place where the text is displayed. See WAI-ARIA 1.1 status (role) for more details.
+
+Examples
+ Including a search results message
+
+
+
+
+ <div role="status">5 results returned.</div>
+
+ Updating the shopping cart status
+ <p>
) is marked with the role of status
. Because it adds visual context, the shopping cart image -- with succinct and accurate ALT text -- is also placed in the container. Due to the default aria-atomic
value, a screen reader will announce "Shopping cart, six items".
+
+
+
+ <p role="status" >
+ <img src="shopping-cart.png" alt="Shopping Cart">
+ <br>
+ <span id="cart">0</span> items
+ </p>
+
+Tests
+ Procedure
+
+
+ role
attribute with a value of status
before the status message occurs.Expected Results
+
+
+ Using a WAI-ARIA role to expose the role of a user interface component
When to Use
- Description
- Examples
+Using a WAI-ARIA role to expose the role of a user interface component
When to Use
+ Description
+ Examples
Example 1: A simple toolbar
- Description
+ A simple toolbar
+
<div role="toolbar"
@@ -38,11 +38,11 @@
Example 1: A simple toolbar
</div>
Example 2: A Tree Widget
- Description
+ A Tree Widget
+
<ul role="tree" tabindex="0">
@@ -81,9 +81,9 @@
Example 2: A Tree Widget
</ul>
Tests
+ Tests
Procedure
@@ -96,14 +96,14 @@
Example 2: A Tree Widget
Resources
+ Resources
diff --git a/techniques/aria/ARIA5.html b/techniques/aria/ARIA5.html
index bc8bfc69b0..56d4e236a6 100644
--- a/techniques/aria/ARIA5.html
+++ b/techniques/aria/ARIA5.html
@@ -1,11 +1,11 @@
-Example 2: A Tree Widget
WAI-ARIA 1.1 Authoring Practices
Using WAI-ARIA state and property attributes to expose the state of a user interface component
When to Use
- Description
- Examples
+Using WAI-ARIA state and property attributes to expose the state of a user interface component
When to Use
+ Description
+ Examples
Example 1: A toggle button
- Description
+ A toggle button
+
@@ -40,11 +40,11 @@
Example 1: A toggle button
}
Example 2: A slider
- Description
+ A slider
+
var handle = '<img id="' + id + '" class="' + (this.vert == true ? 'v':'h') +'sliderHandle" ' +
@@ -63,12 +63,12 @@
Example 2: A slider
}
Tests
+ Tests
Procedure
Example 2: A slider
Resources
+ Resources
diff --git a/techniques/aria/ARIA6.html b/techniques/aria/ARIA6.html
index 836ac22c75..2feaa49a69 100644
--- a/techniques/aria/ARIA6.html
+++ b/techniques/aria/ARIA6.html
@@ -1,34 +1,34 @@
-Using aria-label to provide labels for objects
When to Use
- Description
+Using aria-label to provide labels for objects
When to Use
+ Description
Examples
+ Examples
Example 1: Distinguishing navigation landmarks
- Description
+ Distinguishing navigation landmarks
+
<div role="navigation" aria-label="Primary">
<ul><li>...a list of links here ...</li></ul> </div>
<div role="navigation" aria-label="Secondary">
<ul><li>...a list of links here ...</li> </ul></div>
- Example 2: Identifying region landmarks
- Description
+ Identifying region landmarks
+
<div role="region" aria-label="weather portlet">
...
</div>
- Example 3: Providing a label for Math
- Description
+ Providing a label for Math
+
<div role="math" aria-label="6 divided by 4 equals 1.5">
- <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <math xmlns="https://www.w3.org/1998/Math/MathML">
<mfrac>
<mn>6</mn>
<mn>4</mn>
@@ -37,9 +37,9 @@
- Example 3: Providing a label for Math
<mn>1.5</mn>
</math>
</div>Tests
+ Tests
Procedure
@@ -51,17 +51,17 @@
Example 3: Providing a label for Math
Resources
+ Resources
diff --git a/techniques/aria/ARIA7.html b/techniques/aria/ARIA7.html
index 4fa2588b31..322d6704dd 100644
--- a/techniques/aria/ARIA7.html
+++ b/techniques/aria/ARIA7.html
@@ -1,36 +1,36 @@
-Using aria-labelledby for link purpose
When to Use
- Description
+Using aria-labelledby for link purpose
When to Use
+ Description
Examples
+ Examples
Example 1: Providing additional information for links
- Description
+ Providing additional information for links
+
<h2 id="headline">Storms hit east coast</h2>
<p>Torrential rain and gale force winds have struck the east coast, causing flooding in many coastal towns.
<a id="p123" href="news.html" aria-labelledby="p123 headline">Read more...</a></p>
- Example 2: Concatenating link text from multiple sources
- Description
+ Concatenating link text from multiple sources
+
<p>Download <span id="report-title" tabindex="-1">2012 Sales Report</span>:
<a aria-labelledby="report-title pdf" href="#" id="pdf">PDF</a> |
<a aria-labelledby="report-title doc" href="#" id="doc">Word</a> |
<a aria-labelledby="report-title ppt" href="#" id="ppt">Powerpoint</a></p>
- Tests
+ Tests
Procedure
@@ -43,11 +43,11 @@
Example 2: Concatenating link text from multiple sources
Resources
+ Resources
diff --git a/techniques/aria/ARIA8.html b/techniques/aria/ARIA8.html
index 608fdc62f3..6c133849c3 100644
--- a/techniques/aria/ARIA8.html
+++ b/techniques/aria/ARIA8.html
@@ -1,12 +1,12 @@
-Using aria-label for link purpose
When to Use
- Description
+Using aria-label for link purpose
When to Use
+ Description
Examples
+ Examples
Example 1: Describing the purpose of a link in HTML using aria-label.
- Description
+ Describing the purpose of a link in HTML using aria-label.
+
<h4>Neighborhood News</h4>
<p>Seminole tax hike: Seminole city managers are proposing a 75% increase in
@@ -18,9 +18,9 @@
- Example 1: Describing the purpose of a link in HTML using aria-label.
old Willy "Dusty" Williams in yesterday's mayoral election.
<a href="babymayor.html" aria-label="Read more about Seminole's new baby mayor">[Read more...]</a>
</p>Tests
+ Tests
Procedure
@@ -32,20 +32,20 @@
Example 1: Describing the purpose of a link in HTML using aria-label.
Resources
+ Resources
diff --git a/techniques/aria/ARIA9.html b/techniques/aria/ARIA9.html
index 9f0b2f1848..c5c17c3ec3 100644
--- a/techniques/aria/ARIA9.html
+++ b/techniques/aria/ARIA9.html
@@ -1,20 +1,20 @@
-Using aria-labelledby to concatenate a label from several text nodes
When to Use
- Description
+Using aria-labelledby to concatenate a label from several text nodes
When to Use
+ Description
Examples
+ Examples
Example 1: A time-out input field with concatenated label
- Description
+ A time-out input field with concatenated label
+
Example 1: A time-out input field with concatenated label
aria-labelledby="timeout-label timeout-duration timeout-unit">
<span id="timeout-unit" tabindex="-1"> minutes</span></p>
</form>
- Example 2: A simple data table with text inputs
- Description
+ A simple data table with text inputs
+
<table>
<tr>
@@ -52,12 +52,12 @@
- Example 2: A simple data table with text inputs
<td><input type="text" size="20" aria-labelledby="sp div" /></td>
</tr>
</table>Example 3: A conference workshop booking table
- Description
+ A conference workshop booking table
+
<h1>Dinosaur Conference workshops timetable Thursday, 14. & Friday, 15. March 2013</h1>
@@ -141,10 +141,10 @@
- Example 3: A conference workshop booking table
</tr>
</tbody>
</table>Tests
+ Tests
Procedure
@@ -160,20 +160,20 @@
Example 3: A conference workshop booking table
Resources
+ Resources
Allowing the user to extend the default time limit
-
When to Use
+Allowing the user to extend the default time limit
+
When to Use
Description
+ Description
Examples
+ Examples
- Tests
+ Tests
Procedure
Resources
+ Resources
Using scripts to make nonessential alerts optional
When to Use
+Using scripts to make nonessential alerts optional
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<script type="text/javascript">
var bDoAlerts = false; // global variable which specifies whether to
@@ -40,9 +40,9 @@
showQuotes();
</script>
- Description
+
<body>
<p>Press the button below to enable the display of famous quotes
@@ -52,11 +52,11 @@
<button id="disableBtn" type="button" onclick="modifyAlerts(false);">
Turn Alerts Off</button></p>
- Description
- Tests
+ Tests
Procedure
diff --git a/techniques/client-side-script/SCR16.html b/techniques/client-side-script/SCR16.html
index 93a39a6d7b..0019a601ae 100644
--- a/techniques/client-side-script/SCR16.html
+++ b/techniques/client-side-script/SCR16.html
@@ -1,24 +1,24 @@
-
Providing a script that warns the user a time limit is about to expire
When to Use
+Providing a script that warns the user a time limit is about to expire
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
+ "https://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Stock Market Quotes</title>
@@ -54,7 +54,7 @@
</html>
Tests
+ Tests
Procedure
Providing client-side validation and alert
When to Use
+Providing client-side validation and alert
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Checking a single control with an event handler
- Description
+ Checking a single control with an event handler
+
<label for="date">Date:</label>
<input type="text" name="date" id="date"
@@ -17,8 +17,8 @@
Example 1: Checking a single control with an event handler
Example 2: Checking multiple controls when the user submits the form
- Description
+ Checking multiple controls when the user submits the form
+
Example 2: Checking multiple controls when the user submits the form
</p>
</form>
- Tests
+ Tests
Procedure
@@ -78,6 +78,6 @@
Example 2: Checking multiple controls when the user submits the form
Using an onchange event on a select element without causing a change of
- context
When to Use
+Using an onchange event on a select element without causing a change of
+ context
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/xhtml; charset=utf-8" />
@@ -108,13 +108,13 @@
</select>
</body>
</html>
- Description
- Tests
+ Tests
Procedure
Resources
+ Resources
diff --git a/techniques/client-side-script/SCR2.html b/techniques/client-side-script/SCR2.html
index 47cf4d9c00..32db521d84 100644
--- a/techniques/client-side-script/SCR2.html
+++ b/techniques/client-side-script/SCR2.html
@@ -1,16 +1,16 @@
-Using redundant keyboard and mouse event handlers
When to Use
+Using redundant keyboard and mouse event handlers
When to Use
Description
+ Description
Examples
+ Examples
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -37,11 +37,11 @@
</head>
<body>
<p>Mouse over or tab to the links below and see the image change.</p>
- <a href="http://www.w3.org/wai" onmouseover="updateImage('wai', true);" onfocus="updateImage('wai', true);"
+ <a href="https://www.w3.org/wai" onmouseover="updateImage('wai', true);" onfocus="updateImage('wai', true);"
onmouseout="updateImage('wai',false);" onblur="updateImage('wai',false);">
<img src="greyplus.gif" border="0" alt="" id="wai">
W3C Web Accessibility Initiative</a> &
- <a href="http://www.w3.org/International/" onmouseover="updateImage('i18n', true);"
+ <a href="https://www.w3.org/International/" onmouseover="updateImage('i18n', true);"
onfocus="updateImage('i18n',true);" onmouseout="updateImage('i18n',false);"
onblur="updateImage('i18n',false);">
<img src="greyplus.gif" border="0" alt="" id="i18n">
@@ -50,7 +50,7 @@
</html>
Tests
+ Tests
Procedure
diff --git a/techniques/client-side-script/SCR20.html b/techniques/client-side-script/SCR20.html
index 2b98f09cdd..856d1f7c56 100644
--- a/techniques/client-side-script/SCR20.html
+++ b/techniques/client-side-script/SCR20.html
@@ -1,6 +1,6 @@
-
Using both keyboard and other device-specific functions
When to Use
+Using both keyboard and other device-specific functions
When to Use
Description
+ Description
+
+
+
+ Use...
+ ...with
+
+
+
+
+ mousedown
+
+
+ keydown
+
+
+
+
+ mouseup
+
+
+ keyup
+
+
+
+
+ click
+
+ [1]
+
+
+ keypress
+
+ [2]
+
+
+
+
+ mouseover
+
+
+ focus
+
+
+
+
+
+ mouseout
+
+
+ blur
+ Examples
+ Examples
Description
+
<a href="menu.php" onmouseover="swapImageOn('menu')" onfocus="swapImageOn('menu')"
onmouseout="swapImageOff('menu')" onblur="swapImageOff('menu')">
@@ -83,20 +84,20 @@
</a>
Description
+
<img onclick="nextPage();" onkeypress="nextPage();" tabindex="0" src="arrow.gif"
alt="Go to next page">
- Description
+
Tests
+ Tests
Procedure
Resources
+ Resources
Using functions of the Document Object Model (DOM) to add content to a page
When to Use
+Using functions of the Document Object Model (DOM) to add content to a page
When to Use
Description
+ Description
Examples
+ Examples
Description
+
window.onload = initialise;
function initialise()
@@ -26,9 +26,9 @@
objForm.onsubmit= function(){return validateNumbers(this);};
}
- Description
+
function validateNumbers(objForm)
{
@@ -96,9 +96,9 @@
return (!isNaN(strValue) && strValue.replace(/^\s+|\s+$/, '') !== '');
}
- Description
+
// Function to create a list item containing a link describing the error
// that points to the appropriate form field
@@ -129,11 +129,11 @@
objForm[strFormField].focus();
return false;
}
- Description
+
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "https://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>ECMAScript Form Validation</title>
@@ -161,14 +161,14 @@
</body>
</html>
- Description
+
Tests
+ Tests
Procedure
@@ -180,7 +180,7 @@
Resources
+ Resources
Using scripts to control blinking and stop it in five seconds or less
When to Use
+Using scripts to control blinking and stop it in five seconds or less
When to Use
Description
+ Description
Examples
+ Examples
Description
+
...
<div id="blink1" class="highlight">New item!</div>
@@ -35,11 +35,11 @@
</script>
...
- Description
- Tests
+ Tests
Procedure
diff --git a/techniques/client-side-script/SCR24.html b/techniques/client-side-script/SCR24.html
index 8f23a2922b..4c2a2562a8 100644
--- a/techniques/client-side-script/SCR24.html
+++ b/techniques/client-side-script/SCR24.html
@@ -1,6 +1,6 @@
-
Using progressive enhancement to open new windows on user request
When to Use
+Using progressive enhancement to open new windows on user request
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
<script type="text/javascript" src="popup.js"></script>
…
<a href="help.html" id="newwin">Show Help</a
- Description
+
// Use traditional event model whilst support for event registration
// amongst browsers is poor.
@@ -74,7 +74,7 @@
Example 1:
return false;
}Tests
+ Tests
Procedure
Example 1:
Resources
+ Resources
Inserting dynamic content into the Document Object Model immediately following its trigger element
When to Use
+Inserting dynamic content into the Document Object Model immediately following its trigger element
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<a href="#" onclick="ShowHide('foo',this)">Toggle</a>
- Description
+
function ShowHide(id,src)
{
var el = document.getElementById(id);
@@ -31,11 +31,11 @@
el.style.display = ('none' == el.style.display ? 'block' : 'none');
}
}
- Description
+
Tests
+ Tests
Procedure
Reordering page sections using the Document Object Model
When to Use
+Reordering page sections using the Document Object Model
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<ul id="swapper">
<li id="black">
<div class="module">
@@ -31,9 +31,9 @@
</li>
...
</ul>
- Description
+
function MoveNode(evt,dir)
{
HarmonizeEvent(evt);
@@ -73,9 +73,9 @@
}
src.focus();
}
- Description
+
ul#swapper { margin:0px; padding:0px; list-item-style:none; }
ul#swapper li { padding:0; margin:1em; list-style:none; height:5em; width:15em;
border:1px solid black; }
@@ -92,7 +92,7 @@
display:block; width:100%; }
Tests
+ Tests
Procedure
Using an expandable and collapsible menu to bypass block of content
When to Use
+Using an expandable and collapsible menu to bypass block of content
When to Use
Description
+ Description
Examples
+ Examples
Description
+
...
@@ -33,14 +33,14 @@
...
- Description
- Description
+
...
@@ -60,11 +60,11 @@
...
- Description
- Tests
+ Tests
Procedure
Resources
+ Resources
Adding keyboard-accessible actions to static HTML elements
When to Use
+Adding keyboard-accessible actions to static HTML elements
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Adding a JavaScript action to a div element
- Description
+ Adding a JavaScript action to a div element
+
...
<script type="text/javascript">
@@ -62,11 +62,11 @@
- Example 1: Adding a JavaScript action to a div element
<div id="message">Hello, world!</div>
...
Description
- Tests
+ Tests
Procedure
@@ -82,24 +82,24 @@
Example 1: Adding a JavaScript action to a div element
Resources
+ Resources
-
Using scripts to change the link text
When to Use
+Using scripts to change the link text
When to Use
Description
+ Description
Examples
+ Examples
Description
+
...
<script type="text/javascript">
@@ -75,11 +75,11 @@
...
- Description
- Tests
+ Tests
Procedure
Examples
+ Examples
Example 1: Specifying only background color with CSS
- Description
+ Specifying only background color with CSS
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
@@ -37,15 +37,15 @@
Example 1: Specifying only background color with CSS
</html>Example 2: Specifying only foreground color with CSS
- Description
+ Specifying only foreground color with CSS
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
@@ -61,15 +61,15 @@
Example 2: Specifying only foreground color with CSS
</html>Example 3: Specifying foreground color of link text with CSS
- Description
+ Specifying foreground color of link text with CSS
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
- "http://www.w3.org/TR/html4/strict.dtd">
+ "https://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
@@ -87,16 +87,16 @@
Example 3: Specifying foreground color of link text with CSS
</html>Example 4: Specifying only background color with bgcolor in HTML
- Description
+ Specifying only background color with bgcolor in HTML
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
@@ -108,16 +108,16 @@
Example 4: Specifying only background color with bgcolor in HTML
</html>Example 5: Specifying only foreground color with the text attribute in HTML
- Description
+ Specifying only foreground color with the text attribute in HTML
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
@@ -129,7 +129,7 @@
Example 5: Specifying only foreground color with the text attribute in HTML
</body>
</html>
Tests
+ Tests
Procedure
Example 5: Specifying only foreground color with the text attribute in HTML
Resources
+ Resources
diff --git a/techniques/failures/F25.html b/techniques/failures/F25.html
index 82faa4f908..025a61a3c6 100644
--- a/techniques/failures/F25.html
+++ b/techniques/failures/F25.html
@@ -1,13 +1,13 @@
-Failure of Success Criterion 2.4.2 due to the title of a Web page not identifying the
- contents
When to Use
+Failure of Success Criterion 2.4.2 due to the title of a Web page not identifying the
+ contents
When to Use
Description
+ Description
Examples
+ Examples
Description
+
- Description
+
Tests
+ Tests
Procedure
Resources
Resources
- Failure of Success Criterion 1.3.3 due to using a graphical symbol alone to convey information
When to Use
+
+ Failure of Success Criterion 1.3.3 due to using a graphical symbol alone to convey information
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Glyphs Used to Indicate Status
- Description
+ Glyphs Used to Indicate Status
+
Tests
+ Tests
Procedure
Example 1: Glyphs Used to Indicate Status
content fails this Success Criterion.
Resources
Resources
Failure of Success Criterion 1.1.1 due to using CSS to include images that convey
- important information
When to Use
+Failure of Success Criterion 1.1.1 due to using CSS to include images that convey
+ important information
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
The CSS contains:
p#bestinterest {
padding-left: 200px;
background: transparent url(/images/TopRate.png) no-repeat top left;
}
- Description
+
<p id="bestinterest">
Where else would you find a better interest rate?
</p>
Example 2:
- Description
+
+
ul#booklist li {
padding-left: 20px;
@@ -63,9 +63,9 @@
- Example 2:
ul#booklist li.outstock {
background: transparent url(outstock.png) no-repeat top left;
}Description
+
<ul id="booklist">
<li class="new">Some book</li>
@@ -76,8 +76,8 @@
Example 2:
</ul>Example 3:
- Description
+
+
<p id="bestinterest" style="background: transparent url(/images/TopRate.png) no-repeat top left;" >
Where else would you find a better interest rate?
@@ -90,9 +90,9 @@
- Example 3:
newP.style.background = 'transparent url(/images/TopRate.png) no-repeat top left';
document.body.appendChild(newP);
</script> Tests
+ Tests
Procedure
Example 3:
Resources
Resources
Failure of Success Criterion 1.1.1 and 1.2.1 due to using text alternatives that are not
- alternatives (e.g., filenames or placeholder text)
When to Use
+Failure of Success Criterion 1.1.1 and 1.2.1 due to using text alternatives that are not
+ alternatives (e.g., filenames or placeholder text)
When to Use
Description
+ Description
Examples
+ Examples
Description
+
- Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 3.2.4 due to using two different labels for the same function on different Web pages within a set of Web pages
When to Use
+Failure of Success Criterion 3.2.4 due to using two different labels for the same function on different Web pages within a set of Web pages
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Example 2:
- Description
+
+
Tests
+ Tests
Procedure
Example 2:
Resources
Resources
Failure of Success Criterion 1.3.2 due to using white space characters to control
- spacing within a word
When to Use
+Failure of Success Criterion 1.3.2 due to using white space characters to control
+ spacing within a word
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Failure due to adding white space in the middle of a word
- Description
+ Failure due to adding white space in the middle of a word
+
<h1>W e l c o m e</h1>
- Description
+
<h1>H E L L O</h1>
Example 2: White space in the middle of a word changing its meaning
- Description
+ White space in the middle of a word changing its meaning
+
<h1>東 京</h1>
Example 3: Using line break characters to format vertical text
- Description
+ Using line break characters to format vertical text
+
<table>
<caption>表1. 都道府県別一覧表</caption>
@@ -70,7 +70,7 @@
Example 3: Using line break characters to format vertical text
</table>
Tests
+ Tests
Procedure
Example 3: Using line break characters to format vertical text
content fails this Success Criterion.
Resources
Resources
Failure of Success Criterion 1.3.1 and 1.3.2 due to using white space characters to
- create multiple columns in plain text content
When to Use
+Failure of Success Criterion 1.3.1 and 1.3.2 due to using white space characters to
+ create multiple columns in plain text content
When to Use
Description
+ Description
Examples
+ Examples
Description
+
Web Content Accessibility Guidelines including blindness and low vision,
2.0 (WCAG 2.0) covers a wide range of deafness and hearing loss, learning
@@ -33,7 +33,7 @@
"Accessible" means usable to a wide many different devices - including a
range of people with disabilities, wide variety of assistive technologies.
- Description
+
@@ -51,9 +51,9 @@
font, or increased in size until lines no longer fit on the page,
similar interpretation issues would arise in the visual
presentation.
-
Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 1.3.1 and 1.3.2 due to using white space characters to
- format tables in plain text content
When to Use
+Failure of Success Criterion 1.3.1 and 1.3.2 due to using white space characters to
+ format tables in plain text content
When to Use
Description
+ Description
Examples
+ Examples
Description
+
Menu
Breakfast Lunch Dinner
@@ -39,7 +39,7 @@
orange juice potato salad Italian bread
brownie ice cream
- Description
+
@@ -55,9 +55,9 @@
the text were reflowed, or changed from a fixed to a variable font,
or increased in size until lines no longer fit on the page, similar
issues would arise in the visual presentation.
-
Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 3.2.2 due to automatically submitting a form and
+ given a value
Failure of Success Criterion 3.2.2 due to automatically submitting a form and
presenting new content without prior warning when the last field in the form is
- given a value
When to Use
+ given a valueWhen to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Example 1:
submit a form, and should instead use a submit button, or rely on
the form's default behavior of submitting when the user hits enter
in a text field.
-
<form method="get" id="form1">
<input type="text" name="text1" size="3" maxlength="3"> -
@@ -34,11 +34,11 @@
Example 1:
</form> Example 2:
- Description
+
+
<form method="get" id="form2">
<input type="text" name="text1">
@@ -50,7 +50,7 @@
Example 2:
</select>
</form>Tests
+ Tests
Procedure
Example 2:
fails the Success Criterion.
Resources
+ Resources
Failure of Success Criterion 3.2.2 due to launching a new window without prior warning
- when the selection of a radio button, check box or select list is changed
When to Use
+Failure of Success Criterion 3.2.2 due to launching a new window without prior warning
+ when the selection of a radio button, check box or select list is changed
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
<script type="text/JavaScript">
function goToMirror(theInput) {
@@ -45,7 +45,7 @@
Example 1:
</p>
</form>Tests
+ Tests
Procedure
Example 1:
Resources
Resources
Failure of Success Criterion 1.1.1 due to not marking up decorative images in HTML in a way that allows assistive technology to ignore them
When to Use
+Failure of Success Criterion 1.1.1 due to not marking up decorative images in HTML in a way that allows assistive technology to ignore them
When to Use
Description
+ Description
Examples
+ Examples
- Tests
+ Tests
Procedure
@@ -25,4 +25,4 @@
Resources
Resources
Failure of Success Criterion 1.1.1 due to providing a text alternative that is not null (e.g., alt="spacer" or alt="image") for images that should be ignored by assistive technology
When to Use
+Failure of Success Criterion 1.1.1 due to providing a text alternative that is not null (e.g., alt="spacer" or alt="image") for images that should be ignored by assistive technology
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Decorative images that have no alt attribute
- Description
+ Decorative images that have no alt attribute
+
Example 1: Decorative images that have no alt attribute
announced by screen readers and displayed in some alternate color schemes.
<div>Tree type: <img src="spacer.gif" width="100" height="1" alt="spacer"/>Cedrus deodara</div>
- Tests
+ Tests
Procedure
Example 1: Decorative images that have no alt attribute
fails the Success Criterion. Resources
Resources
Failure of Success Criterion 2.2.2 due to using text-decoration:blink without a
- mechanism to stop it in less than five seconds
When to Use
+Failure of Success Criterion 2.2.2 due to using text-decoration:blink without a
+ mechanism to stop it in less than five seconds
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<p>My Great Product <span style="text-decoration:blink">Sale! $44,995!</span></p>
Tests
+ Tests
Procedure
Resources
+ Resources
diff --git a/techniques/failures/F40.html b/techniques/failures/F40.html
index 6fbb90fded..7226b1b5ec 100644
--- a/techniques/failures/F40.html
+++ b/techniques/failures/F40.html
@@ -1,8 +1,8 @@
-Failure of Success Criterion 2.2.1 and 2.2.4 due to using meta redirect with a time limit
-
When to Use
+Failure of Success Criterion 2.2.1 and 2.2.4 due to using meta redirect with a time limit
+
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
@@ -37,7 +37,7 @@
</html>
Tests
+ Tests
Procedure
Resources
+ Resources
diff --git a/techniques/failures/F41.html b/techniques/failures/F41.html
index 96c6bbddcf..b65bb8d31c 100644
--- a/techniques/failures/F41.html
+++ b/techniques/failures/F41.html
@@ -1,6 +1,6 @@
-Failure of Success Criterion 2.2.1, 2.2.4, and 3.2.5 due to using meta refresh to reload the page
When to Use
+Failure of Success Criterion 2.2.1, 2.2.4, and 3.2.5 due to using meta refresh to reload the page
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
@@ -33,7 +33,7 @@
</html>
Tests
+ Tests
Procedure
Failure of Success Criteria 1.3.1, 2.1.1, 2.1.3, or 4.1.2 when emulating links
When to Use
+Failure of Success Criteria 1.3.1, 2.1.1, 2.1.3, or 4.1.2 when emulating links
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Scripting a span element
- Description
+ Scripting a span element
+
<span onclick="location.href='newpage.html'">
Fake link
@@ -25,12 +25,12 @@
Example 1: Scripting a span element
Example 2: Scripting an img element
- Description
+ Scripting an img element
+
<img src="go.gif"
alt="go to the new page"
@@ -38,15 +38,15 @@
Example 2: Scripting an img element
Example 3: Scripting an img element, with keyboard
+
Scripting an img element, with keyboard
support
- Description
+
function doNav(url)
{
@@ -63,9 +63,9 @@
- Example 3: Scripting an img element, with keyboard
}
}
Description
+
<p>
<img src="bargain.jpg"
@@ -77,14 +77,14 @@
Example 3: Scripting an img element, with keyboard
Example 4: Scripting a div element
- Description
+ Scripting a div element
+
window.onload = init;
@@ -116,16 +116,16 @@
- Example 4: Scripting a div element
window.location.href = strLocation;
}
Description
+
<div id="linklike">
View the results of the survey.
</div>
Tests
+ Tests
Procedure
@@ -139,14 +139,14 @@
Example 4: Scripting a div element
If check #2 is false then this failure condition applies and the content fails Success Criteria 2.1.1 and 2.1.3.
Resources
+ Resources
diff --git a/techniques/failures/F43.html b/techniques/failures/F43.html
index 06e5c2236d..64597913ec 100644
--- a/techniques/failures/F43.html
+++ b/techniques/failures/F43.html
@@ -1,8 +1,8 @@
-Failure of Success Criterion 1.3.1 due to using structural markup in a way that does
- not represent relationships in the content
When to Use
+Failure of Success Criterion 1.3.1 due to using structural markup in a way that does
+ not represent relationships in the content
When to Use
Description
+ Description
Examples
+ Examples
Example 1: A heading used only for visual effect
- Description
+ A heading used only for visual effect
+
<p>Interested in learning more? Write to us at</p>
<h4>3333 Third Avenue, Suite 300 · New York City</h4>
@@ -31,8 +31,8 @@
Example 1: A heading used only for visual effect
Example 2: Using heading elements for presentational effect
- Description
+ Using heading elements for presentational effect
+
Example 2: Using heading elements for presentational effect
elements between the title and the abstract are used only for visual
effect — to control the fonts used to display the authors' names and
the date.
-
<h1>Study on the Use of Heading Elements in Web Pages</h1>
<h3>Joe Jones and Mary Smith<h3>
@@ -52,13 +52,13 @@
Example 2: Using heading elements for presentational effect
Example 3: Using blockquote elements to provide additional
+
Using blockquote elements to provide additional
indentation
- Description
+
<p>After extensive study of the company Web site, the task force
identified the following common problem.</p>
@@ -73,7 +73,7 @@
Example 3: Using blockquote elements to provide additional
Example 4: Using the fieldset and legend elements to
+
Using the fieldset and legend elements to
give a border to text
<fieldset>
@@ -82,7 +82,7 @@
Example 4: Using the fieldset and legend elements to
</fieldset>
Tests
+ Tests
Procedure
Example 4: Using the fieldset and legend elements to
Resources
Resources
Failure of Success Criterion 2.4.3 due to using tabindex to create a tab order that
- does not preserve meaning and operability
When to Use
+Failure of Success Criterion 2.4.3 due to using tabindex to create a tab order that
+ does not preserve meaning and operability
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<ol>
<li><a href="main.html" tabindex="1">Homepage</a></li>
@@ -30,23 +30,23 @@
<li><a href="chapter3.html" tabindex="2">Chapter 3</a></li>
</ol>
- Description
+
Description
+
Tests
+ Tests
Procedure
Resources
+ Resources
-
diff --git a/techniques/failures/F46.html b/techniques/failures/F46.html
index 79dad4ddcb..eb8d33002e 100644
--- a/techniques/failures/F46.html
+++ b/techniques/failures/F46.html
@@ -1,10 +1,10 @@
-Failure of Success Criterion 1.3.1 due to using th elements,
+ layout tables
Failure of Success Criterion 1.3.1 due to using th elements,
caption elements, or non-empty summary attributes in
- layout tables
When to Use
+ layout tablesWhen to Use
Description
+ Description
Examples
+ Examples
Description
+
<table summary="layout table">
<tr>
@@ -66,7 +66,7 @@
</table>
Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 2.2.2 due to using the blink element
When to Use
+Failure of Success Criterion 2.2.2 due to using the blink element
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<p>My Great Product <blink>Sale! $44,995!</blink></p>
Tests
+ Tests
Procedure
Resources
+ Resources
Failure of Success Criterion 1.3.1 due to using the pre element to markup
- tabular information
When to Use
+Failure of Success Criterion 1.3.1 due to using the pre element to markup
+ tabular information
When to Use
Description
+ Description
Examples
+ Examples
Example 1: A schedule formatted with tabs between columns
+ A schedule formatted with tabs between columns
<pre>
Monday Tuesday Wednesday Thursday Friday
@@ -27,7 +27,7 @@
Example 1: A schedule formatted with tabs between columns
Example 2: Election results displayed using preformatted text
+ Election results displayed using preformatted text
<pre>
CIRCUIT COURT JUDGE BRANCH 3
@@ -52,7 +52,7 @@
Example 2: Election results displayed using preformatted text
</pre>
Tests
+ Tests
Procedure
Example 2: Election results displayed using preformatted text
content fails the Success Criterion.Resources
Resources
- Failure of Success Criterion 1.3.2 due to using an HTML layout table that does not make sense when linearized
When to Use
+
+ Failure of Success Criterion 1.3.2 due to using an HTML layout table that does not make sense when linearized
When to Use
Description
+ Description
Examples
+ Examples
Example 1: A layout table that does not linearize correctly
- Description
+ A layout table that does not linearize correctly
+
<table>
<tr>
@@ -43,17 +43,17 @@
- Example 1: A layout table that does not linearize correctly
<td>XYZ gets you to the</td>
</tr>
</table>Description
+
- Example 2: A layout table that separates a meaningful sequence when linearized
- Description
+ A layout table that separates a meaningful sequence when linearized
+
Example 2: A layout table that separates a meaningful sequence when lineariz
<table>
<tr>
@@ -109,7 +109,7 @@
- Example 2: A layout table that separates a meaningful sequence when lineariz
</tr>
</table>
Description
+
Example 2: A layout table that separates a meaningful sequence when lineariz
describing the image, screen readers cannot present the content in a
meaningful sequence corresponding to the sequence presented
visually.
-
Tests
+ Tests
Procedure
Example 2: A layout table that separates a meaningful sequence when lineariz
content fails this Success Criterion.
Resources
Resources
Failure of Success Criterion 2.2.2 due to a script that causes a blink effect without a
- mechanism to stop the blinking at 5 seconds or less
When to Use
+Failure of Success Criterion 2.2.2 due to a script that causes a blink effect without a
+ mechanism to stop the blinking at 5 seconds or less
When to Use
Description
- Examples
+ Description
+ Examples
Description
+
...
<script type="text/javascript">
@@ -36,7 +36,7 @@
<span id="blink1">This content will blink</span>
Tests
+ Tests
Procedure
@@ -46,6 +46,6 @@
Expected Results
Failure of Success Criterion 3.2.1 and 3.2.5 due to opening a new window as soon as a new page is loaded
When to Use
+Failure of Success Criterion 3.2.1 and 3.2.5 due to opening a new window as soon as a new page is loaded
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
window.onload = showAdvertisement;
function showAdvertisement()
@@ -25,11 +25,11 @@
Example 1:
}Example 2:
- Description
+
+
if (window.addEventListener) {
window.addEventListener("load", showAdvertisement, true);
@@ -42,7 +42,7 @@
Example 2:
window.open('noscript.html', '_blank', 'height=200,width=150');
}Tests
+ Tests
Procedure
Example 2:
content fails the Success Criterion.
Resources
+ Resources
Failure of Success Criterion 2.1.1 due to using only pointing-device-specific event
- handlers (including gesture) for a function
When to Use
+Failure of Success Criterion 2.1.1 due to using only pointing-device-specific event
+ handlers (including gesture) for a function
When to Use
- Description
+ Description
Examples
+ Examples
Description
+
Tests
+ Tests
Procedure
Resources
+ Resources
- Failure of Success Criteria 2.1.1, 2.4.7, and 3.2.1 due to using script to remove focus when focus is received
When to Use
+
+ Failure of Success Criteria 2.1.1, 2.4.7, and 3.2.1 due to using script to remove focus when focus is received
When to Use
- Description
+ Description
Examples
+ Examples
<input type="submit" onFocus="this.blur();">
<a href="link.html" onfocus="if(this.blur)this.blur();">Link Phrase</a>
Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 2.2.1 due to using server-side techniques to automatically
- redirect pages after a time-out
When to Use
+Failure of Success Criterion 2.2.1 due to using server-side techniques to automatically
+ redirect pages after a time-out
When to Use
- Description
+ Description
Examples
+ Examples
Description
+
public void doGet (HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
@@ -32,7 +32,7 @@
PrintWriter out = response.getWriter();
response.setHeader("Refresh", "10; URL=TargetPage.html");
out.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
- \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
+ \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
out.println("<html><head><title>Redirect</title></head><body>");
out.println("<p>This page will redirect you in 10 seconds.</p>");
out.println("</body></html>");
@@ -40,23 +40,23 @@
Description
+
<% @Language = "VBScript" %>
<% option explicit
Response.Clear
Response.AddHeader "Refresh", "5; URL=TargetPage.htm"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+ "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
…
<!--HTML code for content that is shown before the redirect is triggered-->
Tests
+ Tests
Procedure
Resources
+ Resources
Failure of Success Criterion 4.1.2 due to using script to make div or span a user interface control in HTML without providing a role for the control
When to Use
+Failure of Success Criterion 4.1.2 due to using script to make div or span a user interface control in HTML without providing a role for the control
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<p>
@@ -46,9 +46,9 @@
}
}
Tests
+ Tests
Procedure
Expected Results
Resources
+ Resources
diff --git a/techniques/failures/F60.html b/techniques/failures/F60.html
index d99884005c..18cd6698cf 100644
--- a/techniques/failures/F60.html
+++ b/techniques/failures/F60.html
@@ -1,31 +1,31 @@
-Failure of Success Criterion 3.2.5 due to launching a new window when a user enters
- text into an input field
When to Use
+Failure of Success Criterion 3.2.5 due to launching a new window when a user enters
+ text into an input field
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Example 2:
- Description
+
+
Tests
+ Tests
Procedure
Example 2:
the content fails this Success Criterion.
Resources
+ Resources
Failure of Success Criterion 3.2.5 due to complete change of main content through an
- automatic update that the user cannot disable from within the content
When to Use
+Failure of Success Criterion 3.2.5 due to complete change of main content through an
+ automatic update that the user cannot disable from within the content
When to Use
Description
- Description
+ Examples
+ Examples
Example 1:
- Description
+
+
Example 2:
- Description
+
+
Example 3:
- Description
+
+
Tests
+ Tests
Procedure
Example 3:
Tests
+ Tests
Procedure
Example 3:
Resources
+ Resources
Failure of Success Criterion 2.4.4 due to providing link context only in content that is not related to the link
When to Use
+Failure of Success Criterion 2.4.4 due to providing link context only in content that is not related to the link
When to Use
Description
+ Description
Examples
+ Examples
Example 1: A Link in an Adjacent Paragraph
- Description
+ A Link in an Adjacent Paragraph
+
@@ -21,11 +21,11 @@
- Example 1: A Link in an Adjacent Paragraph
<p><a href="ff.html">Read More...</a></p>
Example 2: A Link in an Adjacent Cell Within a Layout Table
- Description
+ A Link in an Adjacent Cell Within a Layout Table
+
<table>
@@ -40,9 +40,9 @@
- Example 2: A Link in an Adjacent Cell Within a Layout Table
</tr>
</table>
Tests
+ Tests
Procedure
@@ -56,17 +56,17 @@
Example 2: A Link in an Adjacent Cell Within a Layout Table
Resources
+ Resources
diff --git a/techniques/failures/F65.html b/techniques/failures/F65.html
index b89a35c675..551fac0eed 100644
--- a/techniques/failures/F65.html
+++ b/techniques/failures/F65.html
@@ -1,21 +1,21 @@
-Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type "image"
When to Use
+Failure of Success Criterion 1.1.1 due to omitting the alt attribute or text alternative on img elements, area elements, and input elements of type "image"
When to Use
Description
- Description
+ Examples
+ Examples
Example 1: Missing text alternative
- Description
+ Missing text alternative
+
<img src="../images/animal.jpg" />
Tests
+ Tests
Procedure
@@ -24,13 +24,13 @@
Example 1: Missing text alternative
Example 1: Missing text alternative
Resources
+ Resources
diff --git a/techniques/failures/F66.html b/techniques/failures/F66.html
index 41558ba74d..285dae8011 100644
--- a/techniques/failures/F66.html
+++ b/techniques/failures/F66.html
@@ -1,17 +1,17 @@
-Failure of Success Criterion 3.2.3 due to presenting navigation links in a different relative order on different pages
When to Use
+Failure of Success Criterion 3.2.3 due to presenting navigation links in a different relative order on different pages
When to Use
Description
+ Description
Examples
+ Examples
Example 1: An XHTML menu presenting a series of links that are in a different relative order on two different pages
- Description
+ An XHTML menu presenting a series of links that are in a different relative order on two different pages
+
<div id="menu">
<a href="Brazil.htm">Brazil</a><br />
@@ -20,11 +20,11 @@
- Example 1: An XHTML menu presenting a series of links that are in a differen
<a href="Poland.htm">Poland</a>
</div>
Description
+
<div id="menu">
<a href="Canada.htm">Canada</a><br />
@@ -34,7 +34,7 @@
Example 1: An XHTML menu presenting a series of links that are in a differen
</div>
Tests
+ Tests
Procedure
Example 1: An XHTML menu presenting a series of links that are in a differen
Resources
Resources
Failure of Success Criterion 1.1.1 and 1.2.1 due to providing long descriptions for non-text content that does not serve the same purpose or does not present the same information
When to Use
+Failure of Success Criterion 1.1.1 and 1.2.1 due to providing long descriptions for non-text content that does not serve the same purpose or does not present the same information
When to Use
Description
+ Description
Examples
+ Examples
- Tests
+ Tests
Procedure
@@ -20,8 +20,8 @@
Resources
Resources
Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name
-
When to Use
+Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name
+
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
<form>
@@ -42,11 +42,11 @@
- Example 1:
I have a cat <input type="checkbox" name="pet" value="cat">
</form>
Example 2:
- Description
+
+
<form action="..." method="post">
@@ -58,18 +58,18 @@
- Example 2:
</p>
</form>
Example 3:
- Description
+
+
<input type="text" value="Type your search here"><input type="submit" type="submit" value="Search">
- Tests
+ Tests
Procedure
@@ -91,7 +91,7 @@
Example 3:
Resources
+ Resources
diff --git a/techniques/failures/F69.html b/techniques/failures/F69.html
index e41d0b2b14..78c80854e6 100644
--- a/techniques/failures/F69.html
+++ b/techniques/failures/F69.html
@@ -1,6 +1,6 @@
-Failure of Success Criterion 1.4.4 when resizing visually rendered text up to 200 percent causes the text, image or controls to be clipped, truncated or obscured
When to Use
+Failure of Success Criterion 1.4.4 when resizing visually rendered text up to 200 percent causes the text, image or controls to be clipped, truncated or obscured
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
<div style="font-size:100%; width:120px; height:100px; border: thin solid gray;">
Now is the time for all good men to come to the aid of their country.
</div>
<p>Now is the time for all good men to come to the aid of their country.</p>
- Description
+
Example 2:
- Description
+
+
<div style="font-size:100%; width:120px; height:100px; overflow: hidden; border: thin solid gray;">
Now is the time for all good men to come to the aid of their country.
</div>
<p>Now is the time for all good men to come to the aid of their country.</p>
- Description
+
Tests
+ Tests
Procedure
Example 2:
Failure of Success Criterion 2.2.2 due to an object or applet, such as Java or Flash,
+ for more than five seconds
Failure of Success Criterion 2.2.2 due to an object or applet, such as Java or Flash,
that has blinking content without a mechanism to pause the content that blinks
- for more than five seconds
When to Use
+ for more than five secondsWhen to Use
Description
+ Description
Examples
+ Examples
- Tests
+ Tests
Procedure
@@ -34,6 +34,6 @@
criterion.
Failure of Success Criterion 4.1.1 due to incorrect use of start and end tags or attribute markup
When to Use
+Failure of Success Criterion 4.1.1 due to incorrect use of start and end tags or attribute markup
When to Use
Description
+ Description
@@ -11,63 +11,63 @@
- Examples
+ Examples
Example 1: Missing angle brackets in XHTML
- Description
+ Missing angle brackets in XHTML
+
<p This is a paragraph</p>
Example 2: Missing slash on closing tag in XHTML
- Description
+ Missing slash on closing tag in XHTML
+
<p>This is a paragraph<p>
Example 3: Unbalanced attribute quoting
- Description
+ Unbalanced attribute quoting
+
<input title="name type="text">
Example 4: Lack of whitespace between attributes
- Description
+ Lack of whitespace between attributes
+
<input title="name"type="text">
Example 5: Unquoted attribute with whitespace value
- Description
+ Unquoted attribute with whitespace value
+
<input title=Enter name here type=text>
Example 6: Missing end tags in XHTML
- Description
+ Missing end tags in XHTML
+
<p>This is a paragraph
<p>This is another paragraph</p>
Tests
+ Tests
Procedure
Example 6: Missing end tags in XHTML
Failure of Success Criterion 1.1.1 due to using text look-alikes to represent text without providing a text alternative
When to Use
+Failure of Success Criterion 1.1.1 due to using text look-alikes to represent text without providing a text alternative
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Characters
- Description
+ Characters
+
ϲоοk
Example 2: Character entities
- Description
+ Character entities
+
ϲоοk
- Description
+
Tests
+ Tests
Procedure
Example 2: Character entities
Failure of Success Criterion 1.1.1 due to using ASCII art without providing a text alternative
When to Use
+Failure of Success Criterion 1.1.1 due to using ASCII art without providing a text alternative
When to Use
Description
- Examples
+ Description
+ Examples
Example 1: ASCII Art chart without a text alternative
- Description
+ ASCII Art chart without a text alternative
+
<pre>
% __ __ __ __ __ __ __ __ __ __ __ __ __ __
@@ -26,7 +26,7 @@
Example 1: ASCII Art chart without a text alternative
</pre>
Tests
+ Tests
Procedure
Example 1: ASCII Art chart without a text alternative
Failure of Success Criterion 1.4.1 due to creating links that are not visually evident without color vision
When to Use
+Failure of Success Criterion 1.4.1 due to creating links that are not visually evident without color vision
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Example 2:
- Description
+
+
<head>
<style type="text/css">
@@ -37,14 +37,14 @@
- Example 2:
</body>
Description
+
Tests
+ Tests
Procedure
Example 2:
Failure of Success Criterion 1.2.2 and 1.2.8 due to not labeling a synchronized media alternative to text as an alternative
When to Use
+Failure of Success Criterion 1.2.2 and 1.2.8 due to not labeling a synchronized media alternative to text as an alternative
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Synchronized media alternatives provided elsewhere on page
- Description
+ Synchronized media alternatives provided elsewhere on page
+
Tests
+ Tests
Procedure
Example 1: Synchronized media alternatives provided elsewhere on page
Failure of Success Criterion 1.2.2 by providing synchronized media without captions when the synchronized media presents more information than is presented on the page
When to Use
+Failure of Success Criterion 1.2.2 by providing synchronized media without captions when the synchronized media presents more information than is presented on the page
When to Use
Description
- Examples
Tests
+ Description
+ Examples
Tests
Procedure
Failure of Success Criterion 4.1.1 due to duplicate values of type ID
When to Use
+Failure of Success Criterion 4.1.1 due to duplicate values of type ID
When to Use
Description
+ Description
Examples
+ Examples
Description
+
Description
+
Tests
+ Tests
Procedure
Resources
+ Resources
-
diff --git a/techniques/failures/F78.html b/techniques/failures/F78.html
index 910d340371..6bcb7703f7 100644
--- a/techniques/failures/F78.html
+++ b/techniques/failures/F78.html
@@ -1,30 +1,30 @@
-Failure of Success Criterion 2.4.7 due to styling element outlines and borders in a way that removes or renders non-visible the visual focus indicator
When to Use
+Failure of Success Criterion 2.4.7 due to styling element outlines and borders in a way that removes or renders non-visible the visual focus indicator
When to Use
Description
+ Description
Examples
+ Examples
Example 1: The focus indicator is turned off with CSS
- Description
+ The focus indicator is turned off with CSS
+
:focus {outline: none}
Example 2: The outline of elements is visually similar to the focus indicator
- Description
+ The outline of elements is visually similar to the focus indicator
+
a {outline: thin dotted black}
Example 3: Elements have a border that occludes the focus indicator
- Description
+ Elements have a border that occludes the focus indicator
+
a {border: medium solid black}
Tests
+ Tests
Procedure
Example 3: Elements have a border that occludes the focus indicator
Resources
Resources
Failure of Success Criterion 4.1.2 due to the focus state of a user interface component not being programmatically determinable or no notification of change of focus state available
When to Use
+Failure of Success Criterion 4.1.2 due to the focus state of a user interface component not being programmatically determinable or no notification of change of focus state available
When to Use
Description
+ Description
Examples
+ Examples
Tests
+ Tests
Procedure
Resources
+ Resources
Failure of Success Criterion 1.2.2 due to captions omitting some dialogue or important
- sound effects
When to Use
+Failure of Success Criterion 1.2.2 due to captions omitting some dialogue or important
+ sound effects
When to Use
Description
+ Description
Examples
+ Examples
Description
+
- Tests
+ Tests
Procedure
Resources
Resources
Failure of Success Criterion 1.4.4 when text-based form controls do not resize when visually rendered text is resized up to 200%
When to Use
+Failure of Success Criterion 1.4.4 when text-based form controls do not resize when visually rendered text is resized up to 200%
When to Use
Description
+ Description
Examples
+ Examples
Example 1: A Contact Form
- Description
+ A Contact Form
+
<h1>Contact Us</h1>
<p>Please provide us with your details and we will contact you as soon as we can. Note that all of the form fields are required.</p>
<label for="fname">First Name</label><input type="text" name="fname" id="fname" /><br />
@@ -17,14 +17,14 @@
- Example 1: A Contact Form
<label for="phone">Telephone</label><input type="text" name="phone" id="phone" /><br />
<label for="email">Email</label><input type="text" name="email" id="email" /><br />
<input type="submit" name="Submit" value="Submit" id="Submit" />Description
+
h1 { font-size: 2em; }
p, label { font-size: 1em; }
input {font-size: 12pt}
Tests
+ Tests
Procedure
Example 1: A Contact Form
Resources
Resources
Failure of Success Criterion 1.4.1 due to identifying required or error fields using color differences only
When to Use
+Failure of Success Criterion 1.4.1 due to identifying required or error fields using color differences only
When to Use
Description
+ Description
Examples
+ Examples
Tests
+ Tests
Procedure
diff --git a/techniques/failures/F82.html b/techniques/failures/F82.html
index 2fdf50129c..f2d59338c8 100644
--- a/techniques/failures/F82.html
+++ b/techniques/failures/F82.html
@@ -1,15 +1,15 @@
-
Failure of Success Criterion 3.3.2 by visually formatting a set of phone number fields but not including a text label
When to Use
+Failure of Success Criterion 3.3.2 by visually formatting a set of phone number fields but not including a text label
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Tests
+ Tests
Procedure
Failure of Success Criterion 1.4.3 and 1.4.6 due to using background images that do not provide sufficient contrast with foreground text (or images of text)
When to Use
+Failure of Success Criterion 1.4.3 and 1.4.6 due to using background images that do not provide sufficient contrast with foreground text (or images of text)
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Failure Example 1
- Description
+ Failure Example 1
+
Example 2: Failure Example 2
- Description
- Failure Example 2
+
+ Tests
+ Tests
Procedure
Failure of Success Criterion 2.4.9 due to using a non-specific link such as "click here" or "more" without a mechanism to change the link text to specific text.
When to Use
+Failure of Success Criterion 2.4.9 due to using a non-specific link such as "click here" or "more" without a mechanism to change the link text to specific text.
When to Use
Description
+ Description
Examples
+ Examples
<a href="file110.htm">Click here</a> for more information on the Rocky Mountains.
Tests
+ Tests
Procedure
Failure of Success Criterion 2.4.3 due to using dialogs or menus that are not adjacent to their trigger control in the sequential navigation order
When to Use
+Failure of Success Criterion 2.4.3 due to using dialogs or menus that are not adjacent to their trigger control in the sequential navigation order
When to Use
Description
+ Description
Examples
+ Examples
Example 1: Adding a dialog or menu embedded on the page to the end of the sequential navigation order
- Description
+ Adding a dialog or menu embedded on the page to the end of the sequential navigation order
+
Example 2: Setting focus to the document after dismissing a menu embedded on the page
- Description
+ Setting focus to the document after dismissing a menu embedded on the page
+
Tests
+ Tests
Procedure
@@ -41,6 +41,6 @@
Example 2: Setting focus to the document after dismissing a menu embedded on
Failure of Success Criterion 4.1.2 due to not providing names for each part of a multi-part form field, such as a US telephone number
When to Use
+Failure of Success Criterion 4.1.2 due to not providing names for each part of a multi-part form field, such as a US telephone number
When to Use
Description
+ Description
Examples
+ Examples
Description
+
Phone number:
(<input type="text" size="3">) <input type="text" size="3">-<input type="text" size="4">
Description
+
Phone number: (<input type="text" size="3">) <input type="text" size="3">-<input type="text" size="4">
Description
+
<label for="area">Phone number:</label>
(<input id="area" type="text" size="3">) <input type="text" size="3">-<input type="text" size="4">
Tests
+ Tests
Procedure
@@ -41,7 +41,7 @@
Resources
+ Resources
Failure of Success Criterion 1.3.1 due to inserting non-decorative content by using :before and :after pseudo-elements and the 'content' property in CSS
When to Use
+Failure of Success Criterion 1.3.1 due to inserting non-decorative content by using :before and :after pseudo-elements and the 'content' property in CSS
When to Use
Description
+ Description
Examples
+ Examples
Description
+
p.jim:before { content: "Jim: " }
p.mary:before { content: "Mary: " }
q:before { content: open-quote }
q:after { content: close-quote }
- Description
+
<p class="jim">
<q>Do you think he's going to make it?</q>
</p>
@@ -24,15 +24,15 @@
</p>
Description
+
p.fact:before { content: "Fact: "; font-weight: bold; }
p.opinion:before { content: "Opinion: "; font-weight: bold; }
- Description
+
<p class="fact">
The defendant was at the scene of the crime when it occurred.
</p>
@@ -40,7 +40,7 @@
The defendant committed the crime.
</p>
Tests
+ Tests
Procedure
Resources
+ Resources
diff --git a/techniques/failures/F88.html b/techniques/failures/F88.html
index a9d72f192f..74c55d986a 100644
--- a/techniques/failures/F88.html
+++ b/techniques/failures/F88.html
@@ -1,12 +1,12 @@
-Failure of Success Criterion 1.4.8 due to using text that is justified (aligned to both the left and the right margins)
When to Use
+Failure of Success Criterion 1.4.8 due to using text that is justified (aligned to both the left and the right margins)
When to Use
Description
+ Description
Examples
+ Examples
Description
+
<p align="justify">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum sit amet pede. Phasellus
nec sem id mauris vehicula tincidunt. Morbi ac arcu. Maecenas vehicula velit et orci. Donec
@@ -17,9 +17,9 @@
</p>
Description
+
...
p {text-align: justify}
@@ -33,7 +33,7 @@
primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur pharetra commodo
justo. Nulla facilisi. Phasellus nulla lacus, tempor quis, tincidunt ac, rutrum et, mauris.</p>
Tests
+ Tests
Procedure
Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link
When to Use
+Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link
When to Use
Description
- Examples
+ Description
+ Examples
Example 1: HTML Search Results
- Description
+ HTML Search Results
+
<a href="scores.html">
<img src="football.gif" alt="" />
</a>
@@ -17,7 +17,7 @@
Example 1: HTML Search Results
</a>
}Tests
+ Tests
Procedure
Example 1: HTML Search Results
Resources
+ Resources
Failure of Success Criterion 3.2.5 due to changing the context when the user removes
- focus from a form element
When to Use
+Failure of Success Criterion 3.2.5 due to changing the context when the user removes
+ focus from a form element
When to Use
Description
+ Description
Examples
+ Examples
Example 1:
- Description
+
+
Tests
+ Tests
Procedure
Example 1:
the content fails the Success Criterion. Resources
+ Resources
Failure of Success Criterion 1.3.1 for incorrectly associating table headers and content via the headers and id attributes
When to Use
+Failure of Success Criterion 1.3.1 for incorrectly associating table headers and content via the headers and id attributes
When to Use
Description
+ Description
Examples
- Examples
+ Example 1: Table content not correctly associated to nested headers
- Description
+ Table content not correctly associated to nested headers
+
Example 1: Table content not correctly associated to nested headers
</tr>
</table>
-
- Tests
+ Tests
Procedure
Example 1: Table content not correctly associated to nested headers
Flash Player no longer requires that you add all of the objects in a FLA file to a list of tab index values. Even if you do not specify a tab index for all objects, a screen reader reads each object correctly.
This example contains dynamic TextField instances that are grouped into columns. To ensure the reading order follows the column structure. The TextField instances are given a tab index value that corresponds to their textual content (for example, the TextField containing the text "Sample Text 3" has a tabindex value of 3. Additionally, a single TextField is added that has no tabindex value set. This field contains the text "Not in tab order". Even though this field is visually placed between sample text 2 and 3, it is placed at the end of the custom tab order because it is not assigned a tabindex value.
-The results can be found in the working version of Using tabindex to navigate a column structure. The source of Using tabindex to navigate a column structure is available.
-The results can be found in the working version of Using tabindex to navigate a column structure. The source of Using tabindex to navigate a column structure is available.
+This example contains a Flash based form that is laid out over two columns. To make the tab order follow the column structure, each form control is assigned a tab index value in the Accessibility panel.
-The results are shown in the working version of Controlling tab order in a two-column layout. The source of Controlling tab order in a two-column layout is available.
-The results are shown in the working version of Controlling tab order in a two-column layout. The source of Controlling tab order in a two-column layout is available.
+The objective of this technique is to demonstrate how to invoke a scripting function in a way that is keyboard accessible by attaching it to keyboard-accessible, standard Flash components provided by the Adobe Flash Professional authoring tool. In order to ensure that scripted actions can be invoked from the keyboard, they are associated with standard Flash components such as the Button component. The click event of these components is device independent. While the "CLICK" event is a mouse event, it is actually mapped to the default action of a button. The default action occurs when the user clicks the element with a mouse, but it also occurs when the user focuses the element and hits the space key, and when the element is triggered via the accessibility API.
-This example shows a button that uses the MouseEvent.CLICK event to change its label. This event will fire both on mouse click and when the space key is pressed
-import fl.controls.Button; import fl.accessibility.ButtonAccImpl; @@ -22,19 +25,19 @@-Example 1: Click event on a button
function clickHandler(e) { e.target.label = "Thanks"; }
This approach is demonstrated in the working version of click event on a button. The source of click event on a button is available.
-This approach is demonstrated in the working version of click event on a button. The source of click event on a button is available.
+When a Flash Movie contains interactive controls, confirm that:
The objective of this technique is to allow keyboard focus to move to and from Flash content embedded in a web page. In browsers other than Internet Explorer, there is a problem related to keyboard accessibility of embedded Flash content. The problem is that, while both the Flash content and the HTML content around it may be keyboard accessible, many browsers do not support moving keyboard focus between the Flash content and HTML content without using a mouse. Once focus is placed inside the Flash content, a keyboard user will be trapped there. Similarly, when focus is placed somewhere else on the HTML content (outside the Flash content), it will be impossible to move focus into the content. This technique is designed to let the Flash author address this issue and provide support for moving focus between the Flash content and the HTML content via the keyboard.
This issue has been around for a long time, and is related to the way browsers implement embedded plug-ins. Until this problem is fixed, it is up to the Flash developer to come up with a work around. This technique is one of those workarounds. The approach behind this technique is the following:
With this approach, the developer can use ID values to identify the elements that come before and after the Flash content in the HTML tab order. This is done by setting special class names on the Flash content's <object> element. This is the preferred approach, as it does not cause an unnecessary cluttering of the tab order. However, it does require more work and awareness by the developer (who has to manually set ID values). Also, in some scenarios there simply may not be a next or previous focusable element for a Flash content.
-The two examples below are shown in the working example of Preventing a keyboard trap in Flash content. The example html file has two Flash contents embedded in it. The first Flash content is embedded with the approach described in example 1. The second example is embedded with the approach described in example 2. The source of Preventing a keyboard trap in Flash content is available. The source zip file contains the SWFFocus class.
+The two examples below are shown in the working example of Preventing a keyboard trap in Flash content. The example html file has two Flash contents embedded in it. The first Flash content is embedded with the approach described in example 1. The second example is embedded with the approach described in example 2. The source of Preventing a keyboard trap in Flash content is available. The source zip file contains the SWFFocus class.
To run the example from a local drive (as opposed to running it from a web server), the local directory needs to be added to Flash Player's security settings.
In this example, the SWFFocus class is used without explicitly identifying focusable HTML elements. This will cause SWFFocus to dynamically insert hidden links before and after the Flash content.
Loading the Flash ContentThe Flash object in this example is added using SWFObject's dynamic publishing method, which means that the object tag is created dynamically by JavaScript in a way that the browser supports. While this is the recommended approach, it is not a requirement for using this technique. The SWFFocus class will also work when the object tag is hardcoded into the HTML document.
The sample code below shows how to load the content dynamically with SWFObject.
HTML and Javascript Code Sample for Example 1 -<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Keyboard Trap Fix Example</title> @@ -77,20 +80,20 @@-Example 1: Using automatically generated links
</div> </body> </html>
The SWFFocus class needs to be added to a Flash or Flex project's source path. The easiest way to achieve this is to import the SWFFocus.swc into Library path for your project or to copy the com/swffocus/SWFFocus.as file (including the nested directory structure) to the project's root directory.
When the SWFFocus class is added to the content's source path, it needs to be initialized with the following code:
-import com.adobe.swffocus.SWFFocus; SWFFocus.init(stage);-
The code for the class itself can be found in the source files.
-For a large part, this technique is the same as example 1 :
For example, the HTML code could look like this (notice the added class names on the object tag):
-<a href="http://www.lipsum.com/" id="focus1">test 1</a> <object class="swfPrev-focus1 swfNext-focus2" data="keyboard_trap_fix_as3.swf" tabindex="0" type="application/x-shockwave-flash"/> <a href="http://www.lipsum.com/" id="focus2">test 2</a>-
Since this example uses SWFObject's dynamic loading, the class names will have to be specified as attribute when SWFObject is initialized. This is demonstrated in the code example below.
HTML and Javascript Code Sample for Example 2 -<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Keyboard Trap Fix Example </title> @@ -150,16 +153,16 @@-Example 2: Explicitly identifying existing focusable html element
<a href="http://www.lipsum.com/">lorem</a> </body> </html>
Note: this example assumes that the focusable HTML elements exist and have an ID value at the time SWFObject is called to insert the Flash content. However, in some situations it is also possible that these elements do not yet exist when the Flash content is created, or that the elements will be deleted dynamically at a later point. If this happens, it is possible to reassign ID values for previous and next focusable elements. To do this, call the SWFsetFocusIds() method on the Flash content object, like so:
-var o = document.getElementById("FlashSample1SWF"); o.SWFsetFocusIds('prevId', 'nextId');-
From that point on the updated IDs will be used to move focus to when tabbing out of the Flash content.
-For a Flash content on a web page:
The intent of this technique is to allow a user to turn off sounds that start automatically when a Flash movie loads. The control to turn off the sounds should be located near the beginning of the page to allow the control to be easily and quickly discovered by users . This is useful for those who utilize assistive technologies (such as screen readers, screen magnifiers, switch mechanisms, etc.) and those who may not (such as those with cognitive, learning and language disabilities).
In this technique, an author includes a control that makes it possible for users to turn off any sounds that are played automatically. For maximum accessibility, the control can be added to the HTML document rather than to the Flash movie. The HTML control will communicate with the Flash movie through the ExternalInterface class. This means that the user can control the sound playback without having to interact with Flash content. If this is not practical, the control can be provided within the Flash content, provided that the control is keyboard operable, located early in the tab and reading order, and clearly labeled to indicate that it will turn off the sounds that are playing.
-This example demonstrates the addition of a button within the Flash movie to allow the user to stop sounds from playing. A class called SoundHandler is created which automatically starts playing an mp3 file when the movie loads.
-package wcagSamples { import flash.display.Sprite; import flash.net.URLRequest; @@ -47,16 +50,16 @@-Example 1: Providing a button in the Flash to stop sound
} } }
This is demonstrated in the working example of Providing a button in the Flash to stop sound. The source of Providing a button in the Flash to stop sound is available.
-This is demonstrated in the working example of Providing a button in the Flash to stop sound. The source of Providing a button in the Flash to stop sound is available.
+A class called SoundHandler is created which automatically starts playing an mp3 file when the movie loads. An HTML button is placed in the HTML document containing the Flash movie. When the button is clicked the action is communicated between the HTML page and the Flash movie via the Flash Player JavaScript API, resulting in the toggleSound method being called on the SoundHandler class.
ActionScript 3.0 code for Example 2 -package wcagSamples { import flash.display.Sprite; import flash.external.ExternalInterface; @@ -90,12 +93,12 @@-Example 2: Providing a button in the HTML before the Flash object to stop so } } }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> @@ -131,11 +134,11 @@-Example 2: Providing a button in the HTML before the Flash object to stop so </body> </html>
This is demonstrated in the working example of Providing a button in the HTML before the Flash object to stop sound. The source of source of Providing a button in the HTML before the Flash object to stop sound is available.
-This is demonstrated in the working example of Providing a button in the HTML before the Flash object to stop sound. The source of source of Providing a button in the HTML before the Flash object to stop sound is available.
+For Flash movies that automatically start playing sound after loading:
The objective of this technique is to notify users that they are almost out of time to complete an interaction. When scripts provide functionality that has time limits, the script can include functionality to warn the user of imminent time limits and provide a mechanism to request more time. 20 seconds or more before the time limit occurs, the script provides a confirm dialog that states that a time limit is imminent and asks if the user needs more time. If the user answers "yes" then the time limit is reset. If the user answers "no" or does not respond, the time limit is allowed to expire.
This technique involves time limits set with the setTimeout() method. If, for example, the time limit should be 60 seconds, you can set the time limit for 40 seconds (20 seconds less than the desired timeout) and show a confirm dialog. The confirm dialog sets a new timeout for the remaining 20 seconds. If the user requests more time, a new timeout is set. However, if the 20-second "grace period time limit" expires (meaning 60 seconds have now elapsed), the action appropriate for the expiry of the 60 second time limit in the original design is taken.
-This is a basic AS2 example of a time limit that can be extended by the user. An alert is shown after 40 seconds of inactivity, warning that the session is about to expire. The user is given 20 seconds to press the space bar or click on the "Yes" button. Note that the 40 second duration would be insufficient for most tasks and is artificially short for ease of demonstration.
-import mx.controls.Alert; import flash.accessibility.Accessibility; @@ -45,11 +48,11 @@-Example 1: Using ActionScript to offer a time limit extension before the tim if (e && e.detail && e.detail == Alert.YES) resetTimeout(); }
For a demonstration, see a working example of Using ActionScript to offer a time limit extension before the timeout expires. The source of Using ActionScript to offer a time limit extension before the timeout expires is available.
-For a demonstration, see a working example of Using ActionScript to offer a time limit extension before the timeout expires. The source of Using ActionScript to offer a time limit extension before the timeout expires is available.
+Check #2 is true
The objective of this technique is to provide a long text alternative that serves the same purpose and presents the same information as the original non-text content when a short text alternative is not sufficient.
The Flash Player supports long text alternatives to non-text objects, which can be defined in ActionScript or within Flash authoring tools using the description property, as indicated in the examples below.
-The Flash Professional authoring tool's Accessibility panel lets authors provide accessibility information to assistive technology and set accessibility options for individual Flash objects or entire Flash applications.
Important: Only use the 'Description' field if a short text alternative is not sufficient to describe the objects purpose. Otherwise, leave the 'Description' field empty.
-- +
+ -To manage an object's text equivalents programmatically using ActionScript, the _accProps object must be used. This references an object containing accessibility related properties set for the object. The code example below shows a simple example of how the _accProps object is used to set an objects name and description in ActionScript.
A chart showing sales for October has a short text alternative of "October sales chart". The long description would provide more information, as shown in the code below.
-// 'chart_mc' is an instance placed on the movie's main timeline _root.chart_mc._accProps = new Object(); _root.chart_mc._accProps.name = "October Sales Chart"; @@ -41,11 +44,11 @@Example 2: Applying Description programmatically in ActionScript 2.0
is in sales order.";
To manage an object's text equivalents programmatically using ActionScript, the AccessibilityProperties object must be used. The code example below shows a simple example of how the AccessibilityProperties object used to set an objects name and description in ActionScript.
A chart showing sales for October has a short text alternative of "October sales chart". The long description would provide more information, as shown in the code below.
-// 'chart_mc' is an instance placed on the movie's main timeline chart_mc.accessibilityProperties = new AccessibilityProperties(); chart_mc.accessibilityProperties.name = "October Sales Chart"; @@ -55,7 +58,7 @@Example 3: Applying Description programmatically in ActionScript 3.0
with 195.The primary use of the chart is to show leaders, so the description\ is in sales order.";
#6 is true.
The purpose of this technique is to allow the author to use ActionScript and component skins to apply a strong visual indication when a component receives focus. In this particular technique, both the component's background color and border will change. When the component loses focus, it returns to its normal styling.
The visual highlights will be applied by switching some of the component's skin parts. The Standard Flash components each have their own set of skins that make up the component's visual appearance. Each part is represented by a MovieClip which can be edited or replaced in order to customize how the component looks. The most relevant skin for this technique is the focusRectSkin skin, which is shared by all components. By default this skin applies a subtle visual highlight when the component receives focus.
This technique can be applied through the following steps:
@@ -21,12 +24,12 @@- +
+Modifying Existing Skin
@@ -44,10 +47,10 @@The focusRect skin applies to all focusable Flash components. If you want to modify other highlights (for example highlights that occur when hovering over a component with the mouse), you will have to edit component specific skins individually. For example, to edit the mouseover highlights for the checkbox component, you will have to modify or duplicate both Checkbox_overIcon and Checkbox_selectedOverIcon. Similarly, for the Button component you will have to modify the Button_over skin.
Also, keep in mind that the existing skins are automatically applied on certain events (focus, mouseover, etc.). It is however also possible to manually switch a skin at a moment of your own choosing (e.g. to indicate invalid content for a text field). this can also be achieved this by calling the setStyle method.
-The code below shows an example where form component instances are associated with a modified version of the focusRectSkin MovieClip. The result is that the components receive a thick blue border rather than the default thin border Flash provides. The code makes a reference to a modified skin called Focus_custom, which has been added to the movie's library in advance.
Note that the custom version of focusRectSkin also sets a transparent yellow background to increase the visual highlight further. Components such as Buttons and checkboxes will show this background, but TextInput components will not. To ensure the yellow background will still be applied to the TextInput instance, the following workaround is applied:
Additionally, the button_over skin is duplicated and modified to change the default mouseover highlights for the button component instance. The checkbox_overIcon and checkbox_selectedOverIcon skins are directly modified, which means those changes will be applied to all checkbox instances.
-The result of this technique can be found in the working version of A thick blue border to indicate focus.
+The result of this technique can be found in the working version of A thick blue border to indicate focus.
Code for Example 1 (ActionScript 3.0) -package wcagSamples { import fl.accessibility.ButtonAccImpl; import fl.accessibility.CheckBoxAccImpl; @@ -115,11 +118,11 @@-Example 1: A thick blue border to indicate focus
} } }
This is demonstrated in working version of A thick blue border to indicate focus. The source of working version of A thick blue border to indicate focus is available.
-This is demonstrated in working version of A thick blue border to indicate focus. The source of working version of A thick blue border to indicate focus is available.
+When a Flash movie contains focusable components, confirm that:
The intent of this Technique is to ensure that information and relationships that are implied visually by data tables are also made available programmatically. Specifically, the association between table column headers and their corresponding cells must be exposed to assistive technology. In Flash, the DataGrid component can be used to achieve this. When accessibility is enabled for the DataGrid component, Flash will automatically prepend the column name in front of each cell value when exposing the grid row's accessible name to assistive technology. For example, the row in the screenshot below would be announced by a screen reader as "Row 6 of 13 Name Patty Crawford Bats L Throws L Year Jr Home Whittier, CA".
The DataGrid component in Flash only supports column headings, not row headings.
+
-In this example, statistical data is used as data provider for a dynamically created DataGrid component. The lines import fl.accessibility.DataGridAccImpl; DataGridAccImpl.enableAccessibility(); are required to enable accessibility for the Datagrid Component.
-import fl.accessibility.DataGridAccImpl; DataGridAccImpl.enableAccessibility(); @@ -51,11 +55,11 @@-Example 1: A statistical data table
dg.columns[4].width = 120; dg.move(50, 50); };
This is demonstrated in the working version of A statistical data table. The source of A statistical data table is available.
-This is demonstrated in the working version of A statistical data table. The source of A statistical data table is available.
+For Flash content that contains tabular data:
The objective of this technique is to demonstrate how to provide keyboard access to a Flash MovieClip that is not keyboard accessible by default. This technique ensures that the element is focusable by setting the tabEnabled property, and it ensures that the action can be triggered from the keyboard by providing a keydown handler in addition to a click handler.
-In this example, a custom MovieClip is used as a button. To make it keyboard accessible, the MovieClip is placed in the tab order using the tabEnabled. Additionally, redundant event handlers are added so @@ -18,15 +21,15 @@
This result can be viewed in the working - version of MovieClip used as a button. The source of MovieClip used as a button is available.
+This result can be viewed in the working + version of MovieClip used as a button. The source of MovieClip used as a button is available.
Using a generic MovieClip is generally not recommended, since the custom button will be perceived as a focusable graphic rather than a button. Instead, a better approach would be to use the standard Flash Button component, or create a new symbol with a type of "button".
import flash.accessibility. * import flash.events.KeyboardEvent; import flash.events.MouseEvent; @@ -57,7 +60,7 @@Example 1: MovieClip used as a button
Accessibility.updateProperties(); }
When a Flash Movie contains generic MovieClip instances that are used as interactive controls, confirm that:
@@ -71,7 +74,7 @@The objective of this technique is to provide a brief overview of how data has been organized into a DataGrid or a brief explanation of how to navigate the grid.
@@ -13,10 +16,10 @@ there are multiple groups of columns or rows). The summary may also be helpful for simple data tables that contain many columns or rows of data. -This is an example of a DataGrid being added to the stage in Flash Professional from the Components panel. The description field is used in the Accessibility control panel in Flash to serve as the summary @@ -30,14 +33,14 @@
This is a basic AS3 example of a DataGrid component that has summary text added as its accessible description.
-import fl.accessibility.DataGridAccImpl; import fl.controls.DataGrid; import fl.controls.Label; @@ -91,11 +94,11 @@-Example 2: Adding a summary to a DataGrid with ActionScript 3
dg.columns[3].width = 40; dg.columns[4].width = 120; };
For a demonstration, see the working version of Adding a summary to a DataGrid with ActionScript 3. The source of Adding a summary to a DataGrid with ActionScript 3 is available.
-For a demonstration, see the working version of Adding a summary to a DataGrid with ActionScript 3. The source of Adding a summary to a DataGrid with ActionScript 3 is available.
+If the Flash movie contains a DataGrid component, confirm that summary text has been added to it through the corresponding accessible description diff --git a/techniques/flash/FLASH24.html b/techniques/flash/FLASH24.html index 9b3340a686..dc434b8259 100644 --- a/techniques/flash/FLASH24.html +++ b/techniques/flash/FLASH24.html @@ -1,20 +1,23 @@ -
The objective of this technique is to allow the user to extend the default time limit by providing a mechanism to extend the time when scripts provide functionality that has default time limits. In order to allow the user to request a longer time limit, the script can provide a form (for example) allowing the user to enter a larger time limit or indicating that more time is needed.
-This is a basic AS2 example where the timeout duration can be changed by the user through a dropdown list. In this example there is a combobox with the instance name sessionLimitDuration.
-import mx.controls.Alert; import mx.accessibility.AlertAccImpl; import mx.accessibility.ComboBoxAccImpl; @@ -53,17 +56,17 @@-Example 1: Changing timeout with a dropdown list
Alert.show("please log in again", "Your session has expired"); }
For a demonstration, see the working - version of Changing timeout with a dropdown list. The source of Changing timeout with a dropdown list is available. Please note that the session times are + +
For a demonstration, see the working + version of Changing timeout with a dropdown list. The source of Changing timeout with a dropdown list is available. Please note that the session times are purposefully short for demonstration purposes, developers will want to provide durations that are sufficient to meet the requirements - of Success + of Success Criterion 2.2.1 (Timing Adjustable) .
-For Flash content that include a time limit:
The above is true