参考文献.docx
《参考文献.docx》由会员分享,可在线阅读,更多相关《参考文献.docx(11页珍藏版)》请在冰豆网上搜索。
参考文献
MakinganASP.NETWebSiteAccessible
ScottMitchell
May2004
Appliesto:
Microsoft®ASP.NET Microsoft®.NETFramework Microsoft®VisualStudio®.NET
Summary:
Takeadvantageofinheritanceinthe.NETFrameworktoextendASP.NETclassestomakethemgenerateASP.NETcodethatisfullyaccessibletopeoplewithdisabilities.(13printedpages)
Contents
Introduction
TheWAI,WCAG,andSection508
Microsoft'sAccessibleASP.NETWebControlsforASP.NET1.x
CreatingAnAdaptive,AccessibleDataGridWebControl
UsingtheAccessibleDataGridColumnClassesinanASP.NETWebPage
AccessibilityinASP.NETWhidbey
RelatedBooks
Introduction
WhilethemajorityofonlineusersareabletobrowseWebsitesusingWebbrowserswiththetypicalbrowsersettings,userswithdisabilitiescommonlyusealternativemeanstoaccessonlineinformation.Forexample,ablindusermightuseatext-onlybrowserthatconvertsthetextintoBraille,orreadsthetextaloudusingascreenreader.ApersonwithreducedvisionmightstilluseabrowserlikeMicrosoft®InternetExplorer,butwithascreenmagnifier,orwiththebrowserconfiguredtouseextralargefontsizes.Motordisabilitiesmightprecludeauserfromusingthemouseorkeyboardasaninputdevice.
SincepeoplewithdisabilitiestypicallysurftheWebusingspecialdevicesornon-standardbrowserconfigurations,aWebsite'soveralldesignandHTMLmarkupgreatlyimpactsthedisabledperson'suserexperience.Forexample,specifyingfontsizesusingabsolutemeasurements—like10pt—displaysthefontinthatabsolutesize,andnotrelativetothetextsizetheuserhasconfiguredinhisbrowser.SitesthathaveaFlashorShockwaveinterface,anddonotprovideanalternate,textrepresentation,effectivelycutoffuserswithBrailledevicesortext-to-speechsynthesizers.AWebsiteissaidtobeaccessibleifitisdesignedtotransitiongracefullytoalternatedevices.
Atthispoint,youmightbethinking,"WhyshouldIbotherensuringmyWebsiteisaccessible?
"TherearetwogoodreasonsIcanthinkof:
1.It'sGoodBusiness–AccordingtotheU.S.Census2000,49.7millionAmericanshaveadisability;aJune2000pollbyHarrisInteractiveshowsthat43%ofdisabledAmericansareregularonlineusers,andthatuserswithdisabilitiesspendalmosttwiceasmuchtimeonlinethanuserswithoutdisabilities.Puttheresultsofthesetwosurveystogetherandyou'llfindthattherearemorethan21millionAmericanswithdisabilitieswhoareregularlyonline.BynottakingthetimetomakeyourWebsiteaccessible,youarecuttingoff21millionpotentialvisitors.
2. It'saMandateforGovernmentAgencies–In1998theUnitedStategovernmentpassedSection508oftheRehabilitationAct,requiringFederalagenciestomaketheirelectronicinformationaccessibletoindividualswithdisabilities.ThislawprovidesaccessibilityguidelinesforsoftwareapplicationsandWebapplications,aswellastelecommunicationproductsandvideoproducts.NotonlyareFederalagenciesrequiredtoimplementaccessibilityguidelines,butalsoprivatecompaniesthatarecontractedtoworkfortheFederalgovernment.(AnumberofcountriesoutsidetheU.S.alsohavesimilaraccessibilityrequirementsforgovernmentagencies.)Therefore,creatingaccessibleWebapplicationsisrequiredifyouworkforthegovernmentorforacompanythatprovidesservicestothegovernment.
InthisarticlewewilldiscusswhatstepsyoucantaketoensurethatyourMicrosoft®ASP.NETWebsiteisaccessible.We'lltakeabrieflookattheofficialaccessibilityguidelinesavailabletoday,andthenfocusinontheaccessibilityguidelinesusedbytheUnitedStatesgovernment.Thearticlewrapsupwithalookathowtouseinheritancetoturnnon-accessibleASP.NETWebcontrolsintoonesthatmeetaccessibilityguidelines.
TheWAI,WCAG,andSection508
ThereareanumberofstepsthatcanbetakentomakeaWebsitemoreaccessible.Butwhat,exactly,arethesesteps,andhowmanyofthemdoesonesiteneedtoemployinordertobeconsideredaccessible?
Theanswerstothesequestionsdifferbasedonwhoyouask,andwhatlevelofaccessibilitytheyneedtoprovide.AnintranetsiteforaFortune500companywouldlikelyrequireahigherdegreeofaccessibilitythananintranetsiteforacompanywithonly25employees.
TheWC3'sSayonAccessibility
Tohelpformalizethisdiscussion,in1999theWC3officiallyfoundedtheWebAccessibilityInitiative(WAI),agrouptaskedwithimprovingWebsiteusabilityforpeoplewithdisabilities.TheWAI'sfirstactwastopublishtheWebContentAccessibilityGuidelines,orWCAG.TheWCAGprovidesalistof14guidelinesforaccessibleWebsitedesign.TheguidelinesthemselvesdonotspelloutactionstotaketomakeaWebsitemoreaccessible.Rather,theyarehigh-levelstatementsthatprovidecommentonhowtoensureaccessibility.Forexample,guideline1is"Provideequivalentalternativestoauditoryandvisualcontent."Accompanyingeachguidelineisasetofcheckpoints.Thecheckpointsspelloutactionsthatcanbetakentoensurethattheaccessibilityguidelineismet.Eachcheckpointisgivenoneofthefollowingpriorityvalues:
• Priority1–aWebdevelopermustsatisfythischeckpoint,otherwiseoneormoregroupsofuserswillnotbeabletoaccessthecontent.
• Priority2–aWebdevelopershouldsatisfythischeckpoint,otherwiseoneormoregroupsofuserswillfinditdifficulttoaccessthecontent.
• Priority3–aWebdevelopermayaddressthischeckpoint,otherwiseoneormoregroupsofusersmighthavedifficultywhenaccessingthecontent.
Inadditiontolistingthe14guidelinesandtheirassociated,prioritizedcheckpoints,theWCAGalsoprovidesathree-levelclassificationscaleforWebsiteaccessibility.SitesthatimplementallPriority1checkpointsareratedatconformancelevelA.ThosethatimplementallPriority1andPriority2checkpointsareratedDouble-A,whilethosethatimplementallofthecheckpointsareratedTriple-A.TheWCAGgivesagoodsetofactionstoperformtoensurevaryinglevelsofaccessibility.
AlthoughathoroughdiscussionoftheWCAGisbeyondthescopeofthisarticle,listedbelowarethe14high-levelguidelinesoftheWCAG.Thecheckpointsforeachguideline,andtheirassociatedpriority,canbefoundattheofficialWebContentAccessibilityGuidelines1.0specification.
15. Provideequivalentalternativestoauditoryandvisualcontent
16. Don'trelyoncoloralone
17. Usemarkupandstylesheetsanddosoproperly
18. Clarifynaturallanguageuse
19. Createtablesthattransformgracefully
20.Ensurethatpagesfeaturingnewtechnologiestransformgracefully
21.Ensureusercontroloftime-sensitivecontentchanges
22.Ensuredirectaccessibilityofembeddeduserinterfaces
23.Designfordevice-independence
24.Useinterimsolutions
25.UseW3Ctechnologiesandguidelines
26. Providecontextandorientationinformation
27. Provideclearnavigationmechanisms
28.Ensurethatdocumentsareclearandsimple
Microsoft'sAccessibleASP.NETWebControlsforASP.NET1.x.ManyoftheWCAGcheckpointsandSection508rulesdictatespecificHTMLmarkupthatshouldbeusedtomakeaWebsitemoreaccessible.Forexample,checkpoint5.1intheWCAG(aPriority1checkpoint)andrule(g)inSection508requiresthat
elementsproperlyidentifyrowandcolumnheaders.Thatis,theelementmustbeusedtoidentifydatacells,whereas | mustbeusedtoidentifyheaders.WhenbuildingASP.NETWebsites,developersrarelyhavetoworryaboutgeneratingHTMLmarkup.Rather,Webcontrolsareusedthatemitthepropermarkup.Unfortunately,manyoftheASP.NETWebcontrolsemitmarkupthatviolatestheaccessibilityrulesoutlinedbytheWCAGandSection508.SinceallWebcontrolsare,fundamentally,classesintheMicrosoft®.NETFramework,theirfunctionalitycanbeextendedinanumberofwaystoconformtoaccessibilityguidelines.AprimeexampleofenhancinganexistingASP.NETWebcontroltomeetaccessibilityguidelinescanbeseenwiththeDataGridWebcontrol.TheDataGridWebcontrolthatshipswiththe.NETFrameworkdoesnotconformtorule(g)inSection508/checkpoint5.1intheWCAG.Thatis,theheadersarerenderedusing | elementsinsteadof | .(ToseewhatImean,checkoutthislivedemo,anddoaView/Sourceinyourbrowser.You'llseethattheheaderrowuses | sratherthan | s.)However,inJune2003MicrosoftreleasedanASP.NETHotfixRollupPackagethat,amongotherthings,includesanimprovedversionoftheDataGrid,onethatconformstorule(g)inSection508. Note TheASP.NETHotfixRollupPackageprovidesotheraccessibility-relatedenhancements.Forexample,itaddsanoptionalAssociatedControlIDpropertytotheLabelWebcontroltospecifytheIDoftheWebcontroltheLabelisassociatedwith.Ifthispropertyisprovided,theLabelisrenderedasa CreatingAnAdaptive,AccessibleDataGridWebControl TheWebcontrolsprovidedintheJune2003HotfixbringtheASP.NETWebcontrolsuptoSection508standards.EvenwiththeHotfix,however,therearestillanumberofWCAGPriority1checkpointsnotbeingmet.FortunatelyyoucaneasilyextendthefunctionalityofexistingWebcontrolstoconformtotheaccessibilityguidelinesrequiredbyyourcompany.Thisispossiblethankstothepowerofinheritance.Specifically,wecantakeaWebcontrolthatdoesnotconformtotheaccessibilitystandards,andcreateanextendedWebcontrolthatdoesconformtothestandards.Byusinginheritance,weonlyhavetochan
展开阅读全文
相关搜索
|