Web Accessibility I
Text and Images from Slide
(l) How to fix scripts
- Try to design your site so that it will function properly without JavaScript
- Add functional text to HTML elements that incorporate Javascript for actions (such as clickable images, image maps, etc.) via tag content or tag attributes such as "title" and "alt"
- Good: <a href="javascript:myFunction();">Start myFunction</a>
- If you must use mouse-based event handlers (such as onMouseOver or onMouseDown), use along with keyboard based event handlers (such as onClick, onKeyUp, onKeyPress)
- Avoid some event handlers altogether (onDblClick, onChange)
Lecture Notes