1、参考文献Making an ASP.NET Web Site AccessibleScott MitchellMay 2004Applies to: Microsoft® ASP.NET Microsoft® .NET Framework Microsoft® Visual Studio® .NETSummary: Take advantage of inheritance in the .NET Framework to extend ASP.NET classes to make them generate ASP.NET code that is full
2、y accessible to people with disabilities. (13 printed pages)ContentsIntroductionThe WAI, WCAG, and Section 508Microsofts Accessible ASP.NET Web Controls for ASP.NET 1.xCreating An Adaptive, Accessible DataGrid Web ControlUsing the Accessible DataGrid Column Classes in an ASP.NET Web PageAccessibilit
3、y in ASP.NET WhidbeyRelated BooksIntroductionWhile the majority of online users are able to browse Web sites using Web browsers with the typical browser settings, users with disabilities commonly use alternative means to access online information. For example, a blind user might use a text-only brow
4、ser that converts the text into Braille, or reads the text aloud using a screen reader. A person with reduced vision might still use a browser like Microsoft® Internet Explorer, but with a screen magnifier, or with the browser configured to use extra large font sizes. Motor disabilities might pr
5、eclude a user from using the mouse or keyboard as an input device.Since people with disabilities typically surf the Web using special devices or non-standard browser configurations, a Web sites overall design and HTML markup greatly impacts the disabled persons user experience. For example, specifyi
6、ng font sizes using absolute measurementslike 10ptdisplays the font in that absolute size, and not relative to the text size the user has configured in his browser. Sites that have a Flash or Shockwave interface, and do not provide an alternate, text representation, effectively cut off users with Br
7、aille devices or text-to-speech synthesizers. A Web site is said to be accessible if it is designed to transition gracefully to alternate devices.At this point, you might be thinking, Why should I bother ensuring my Web site is accessible? There are two good reasons I can think of: 1.Its Good Busine
8、ss According to the U.S. Census 2000, 49.7 million Americans have a disability; a June 2000 poll by Harris Interactive shows that 43% of disabled Americans are regular online users, and that users with disabilities spend almost twice as much time online than users without disabilities. Put the resul
9、ts of these two surveys together and youll find that there are more than 21 million Americans with disabilities who are regularly online. By not taking the time to make your Web site accessible, you are cutting off 21 million potential visitors. 2.Its a Mandate for Government Agencies In 1998 the Un
10、ited State government passed Section 508 of the Rehabilitation Act, requiring Federal agencies to make their electronic information accessible to individuals with disabilities. This law provides accessibility guidelines for software applications and Web applications, as well as telecommunication pro
11、ducts and video products. Not only are Federal agencies required to implement accessibility guidelines, but also private companies that are contracted to work for the Federal government. (A number of countries outside the U.S. also have similar accessibility requirements for government agencies.) Th
12、erefore, creating accessible Web applications is required if you work for the government or for a company that provides services to the government. In this article we will discuss what steps you can take to ensure that your Microsoft ASP.NET Web site is accessible. Well take a brief look at the offi
13、cial accessibility guidelines available today, and then focus in on the accessibility guidelines used by the United States government. The article wraps up with a look at how to use inheritance to turn non-accessible ASP.NET Web controls into ones that meet accessibility guidelines.The WAI, WCAG, an
14、d Section 508There are a number of steps that can be taken to make a Web site more accessible. But what, exactly, are these steps, and how many of them does one site need to employ in order to be considered accessible? The answers to these questions differ based on who you ask, and what level of acc
15、essibility they need to provide. An intranet site for a Fortune 500 company would likely require a higher degree of accessibility than an intranet site for a company with only 25 employees.The WC3s Say on AccessibilityTo help formalize this discussion, in 1999 the WC3 officially founded the Web Acce
16、ssibility Initiative (WAI), a group tasked with improving Web site usability for people with disabilities. The WAIs first act was to publish the Web Content Accessibility Guidelines, or WCAG. The WCAG provides a list of 14 guidelines for accessible Web site design. The guidelines themselves do not s
17、pell out actions to take to make a Web site more accessible. Rather, they are high-level statements that provide comment on how to ensure accessibility. For example, guideline 1 is Provide equivalent alternatives to auditory and visual content. Accompanying each guideline is a set of checkpoints. Th
18、e checkpoints spell out actions that can be taken to ensure that the accessibility guideline is met. Each checkpoint is given one of the following priority values: Priority 1 a Web developer must satisfy this checkpoint, otherwise one or more groups of users will not be able to access the content. P
19、riority 2 a Web developer should satisfy this checkpoint, otherwise one or more groups of users will find it difficult to access the content. Priority 3 a Web developer may address this checkpoint, otherwise one or more groups of users might have difficulty when accessing the content. In addition to
20、 listing the 14 guidelines and their associated, prioritized checkpoints, the WCAG also provides a three-level classification scale for Web site accessibility. Sites that implement all Priority 1 checkpoints are rated at conformance level A. Those that implement all Priority 1 and Priority 2 checkpo
21、ints are rated Double-A, while those that implement all of the checkpoints are rated Triple-A. The WCAG gives a good set of actions to perform to ensure varying levels of accessibility.Although a thorough discussion of the WCAG is beyond the scope of this article, listed below are the 14 high-level
22、guidelines of the WCAG. The checkpoints for each guideline, and their associated priority, can be found at the official Web Content Accessibility Guidelines 1.0 specification. 15.Provide equivalent alternatives to auditory and visual content 16.Dont rely on color alone 17.Use markup and style sheets
23、 and do so properly 18.Clarify natural language use 19.Create tables that transform gracefully 20. Ensure that pages featuring new technologies transform gracefully 21. Ensure user control of time-sensitive content changes 22. Ensure direct accessibility of embedded user interfaces 23. Design for de
24、vice-independence 24. Use interim solutions 25. Use W3C technologies and guidelines 26.Provide context and orientation information 27.Provide clear navigation mechanisms 28. Ensure that documents are clear and simple Microsofts Accessible ASP.NET Web Controls for ASP.NET 1.x.Many of the WCAG checkpo
25、ints and Section 508 rules dictate specific HTML markup that should be used to make a Web site more accessible. For example, checkpoint 5.1 in the WCAG (a Priority 1 checkpoint) and rule (g) in Section 508 requires that elements properly identify row and column headers. That is, the element must be
26、used to identify data cells, whereas must be used to identify headers.When building ASP.NET Web sites, developers rarely have to worry about generating HTML markup. Rather, Web controls are used that emit the proper markup. Unfortunately, many of the ASP.NET Web controls emit markup that violates th
27、e accessibility rules outlined by the WCAG and Section 508. Since all Web controls are, fundamentally, classes in the Microsoft® .NET Framework, their functionality can be extended in a number of ways to conform to accessibility guidelines.A prime example of enhancing an existing ASP.NET Web con
28、trol to meet accessibility guidelines can be seen with the DataGrid Web control. The DataGrid Web control that ships with the .NET Framework does not conform to rule (g) in Section 508 / checkpoint 5.1 in the WCAG. That is, the headers are rendered using elements instead of . (To see what I mean, ch
29、eck out this live demo, and do a View/Source in your browser. Youll see that the header row uses s rather than s.) However, in June 2003 Microsoft released an ASP.NET Hotfix Rollup Package that, among other things, includes an improved version of the DataGrid, one that conforms to rule (g) in Sectio
30、n 508.Note The ASP.NET Hotfix Rollup Package provides other accessibility-related enhancements. For example, it adds an optional AssociatedControlID property to the Label Web control to specify the ID of the Web control the Label is associated with. If this property is provided, the Label is rendere
31、d as a HTML element with the for attribute referencing the specified Web control. For more information consult this knowledge base article.Creating An Adaptive, Accessible DataGrid Web ControlThe Web controls provided in the June 2003 Hotfix bring the ASP.NET Web controls up to Section 508 standards
32、. Even with the Hotfix, however, there are still a number of WCAG Priority 1 checkpoints not being met. Fortunately you can easily extend the functionality of existing Web controls to conform to the accessibility guidelines required by your company. This is possible thanks to the power of inheritance. Specifically, we can take a Web control that does not conform to the accessibility standards, and create an extended Web control that does conform to the standards. By using inheritance, we only have to chan
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1