Scripting and Automation

The creation of the web was driven by interoperability and device independence, so that anyone could access the web regardless of the operating systems or devices he/she is using. The web is becoming more interactive as application developers are using various tools to implement their desired interface and interactive functionalities. Problems arise with the automation mechanism used in static and dynamic pages as this makes interaction with the web extremely difficult and sometimes impossible. For example, the user is required to hover the mouse on a link or dynamic menu to be able to open it. Or, as soon as a selection is made in a combo box, the page refreshes automatically and new form controls appear or disappear, or the user is directed to a completely different page. All of these automatic changes make interaction with the page very difficult and sometimes impossible for disabled users.

h2.Major Issues

  • Keyboard support and focus management
  • Orientation to keyboard shortcuts for web controls
  • Information to states and properties of web controls
  • Orientation to dynamic content

Markup

Summary of Markup Associated with the Scripting and Automation Best Practices
Markup Spec Best Practice
Sub-Category
Description
[onclick] HTML4 onClick Event
  • onclick attribute is used to add interaction behaviors to web pages
  • onclick should only be used on elements that can receive input focus
[onmousedown] HTML4 onMouseDown Event
  • onmousedown event handlers are often used to create “drag and drop” user interface elements. The equivalent functionality provided by the “drag and drop” user interface must also be provided through a keyboard interface.
[onmousemove] HTML4 onMouseDown Event
  • onmousemove event handlers are often used to create “drag and drop” user interface elements. The equivalent functionality provided by the “drag and drop” user interface must also be provided through a keyboard interface.
[onmouseout] HTML4 onMouseOver Event
  • onmouseout event handler needs to have a corresponding onblur event handler
  • Elements that include a onmouseout event handler must be focusable
  • onmouseout event handlers that are for purely stylistic effects should us CSS :hover technqiues instead
[onmouseover] HTML4 onMouseOver Event
  • onmouseover event handler needs to have a corresponding onfocus event handler
  • Elements that include a onmouseover event handler must be focusable
  • onmouseover event handlers that are for purely stylistic effects should us CSS :hover technqiues instead
[onmouseup] HTML4 onMouseDown Event
  • onmouseup event event handlers are often used to create “drag and drop” user interface elements. The equivalent functionality provided by the “drag and drop” user interface must also be provided through a keyboard interface.
select[onchange] HTML4 onChange Event
  • onchange event handler must not be used on select elements since the firing of the event commonly occurs when focus changes while viewing the options, this often results in people be redirected to other pages without their control.