CIS525 - Lecture#6 - September 25, 2000

CIS 525 9/25/00 What are accessibility concerns? -low vision -color blindness -deafness -language impairments Why make pages more accessible? -reach as many readers as possible -automation tools and search engines work better -concern over customer alienation Strategy: -adhere to accessibility guidelines -test for accessibility -provide alternate pages Guidelines: 1) tables are fine, IF they read right-left/top-bottom 2) text columns are ok if the spacing works in various environments 3) 'fancy stuff' - i.e. fonts, style sheets - as long as page is functional with these options turned off it may be a good idea to check formatting in 'lynx' 4) provide 'ALT' text for graphics 5) make image maps client side 6) useful text links, (something more than 'click here') 7) good keyboard navigation 8) controls and applets 9) frames/noframes, (be sure to account for 'noframe' option) 10) file formats, (be aware of unusual formats) 11) avoid scrolling marquees 12) provide titles/names for most objects Testing for accessibility: 1) turn off graphics 2) turn off sound 3) turn off style sheets 4) choose "high contrast" option 5) use largest font size 6) re-size browser window 7) navigate using keyboard 8) select all text and copy into clipboard, paste elsewhere 9) use a specialized browser insert Dilbert cartoon here! JavaScript, (chapters 19 & 20) you can 'mix' html and javascript on same page <head> (javascript) </head> <body> (javascript) </body> Another javascript example: <html><head> <title> A JavaScript Example </title> <script> var name=window.prompt("Hello, what is your name?", " "); document.write("Hello, " + name + "! I hope you like JavaScript!"); </script> </head> For older browsers, you may need to prepare for the inability to process javascript <script language "_______" <!-- | | (script stuff here) | | //--> </script> This hides the script from the browser if it is not able to process that script language In JavaScript: x = 0 =>this is a global variable, with a scope of the entire document var x = 0; { (function) } => this has local scope Control structures in JavaScript, (a lot like C++) if(condition) { statements for true } else { statements for false } for(initExpr; condition; incrExpr) { statements to execute } EXAMPLE; for(x=1; x<=10; x++) { y = x * 25; document.write("x=" + x + "<BR>" + "y=" + y + "<BR>"); } 'while', 'continue' and 'break' are also like C++