|
Introduction
Listed below are a few examples of using the
Regular Expression search capability of eValid in site analysis mode
to identify pages that fail to meet the
W3C Content Accessibility Guidelines
(part of W3C's continuing
Web Accessibilty Initiative (WAI).
European interests are also part of the European Commission's eEurope initiative, which includes Website Accessibility Requirements
Also of interest are the ammendments passed to U.S. Section 508 of the Rehabilitation Act of 1974.
In addition, assuring that web pages meet certain criteria may assist in meeting proposed ADA compliance standards, as described in Applying the ADA To the Internet by Cynthia J. Waddell, JD.
Methodology
To apply eValid site analysis to assure compliance is straightforward
using the String Filter capability.
You can set the string filter using the preferences as follows:
eValid: Settings > Site Analysis Filters > String Filter.
The sample regular expressions below accomplish some of the more important
usability checking criteria.
IMG Tags Without ALT Tags
To search for instances in IMG references which do NOT contain the ALT tag
use the regular expression below.
Be sure to select the "Invert Logic (NOT)"
option from the String Filter options.
<(I|i)(M|m)(G|g) [^<]*alt=.*?> |
Pages Require DOCTYPE Specifier
To search for pages which do not contain the required doctype specifier,
use the expression below.
Be sure to select the "Invert Logic (NOT)" option
from the String Filter options.
<!doctype\\s |
Pages Must Have Title Element Defined
To search for pages that do not contain the title element use the
regular expression below.
Be sure to select the "Invert Logic (NOT)" option
from the String Filter preferences.
<title>[^<]+</title> |
Avoiding Duplicated List Items
A common technique in HTML is to use graphic bullets to specify a list.
In this case, the ALT tag should *not* duplicate the list item itself
because this type of duplication confuses a text-only display.
For example:
<p><img alt="step 1" src="image file">step 1</p> <p><img alt="step 2" src="image file">step 2</p>
If the ALT tag cannot be chosen otherwise, an empty alt tag is actually better. To search for ALT Tags which are empty, use the regular expression below. Be sure to select the "Invert Logic (NOT)" option from the String Filter options.
/<img\\s[^>]*?alt="([^"]+)"[^>]*>\\1/ |
Table Elements Should Have Summary Attributes
To search for a table element that does NOT contain
the required summary attribute, use the regular expression
below.
Be sure to select the "Invert Logic (NOT)" option
from the String Filter options.
/
Avoid Automatic Redirection
|