Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

APPENDIX A: WCAG 2.0 Client-Side Scripti... > SCR35: Making actions keyboard acces...

SCR35: Making actions keyboard accessible by using the onclick event of anchors and buttons

Description

The objective of this technique is to demonstrate how to invoke a scripting function in a way that is keyboard accessible by attaching it to a keyboard-accessible control. To ensure that scripted actions can be invoked from the keyboard, they are associated with natively actionable HTML elements (links and buttons). The onclick event of these elements is device independent. Although “onclick” sounds like it is tied to the mouse, the onclick event is actually mapped to the default action of a link or button. The default action occurs when the user clicks the element with a mouse, but it also occurs when the user focuses the element and presses Enter or the spacebar, and when the element is triggered via the accessibility API.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial