Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-35951

Accessibility: Remove onkeypress handlers from links and form controls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.7.2, 2.8.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Non-mouse users (keyboard only and other adaptive technology users), screen-reader users
    • Previous Issue Keys:
      SAM-1228

      Description

      The onclick event handler is triggered when the mouse is pressed when over an HTML element. At first glance, it appears that onclick is a device dependent event handler and that its use alone would be an accessibility problem. However, that is not always the case and here lies the problem.

      onclick is intended to be a mouse dependent event handler. However, if the onclick event handler is used with hypertext links or form controls, then most major browsers and assistive technologies trigger onclick if the Enter key or Space bar are pressed when the link or control has focus. In these cases, onclick is a device independent event handler. If an onkeypress hander is also used on these controls, then a problem occurs due to the redundancy created by both event handlers firing when the Enter key or Space bar are pressed.

      (Note/FYI: the Enter key will not trigger the onClick event if it is used with non-link and non-control elements, such as div, span, table cells, etc.)

      In the Samigo tool, there are many links and form controls that have both an onclick event handler and an onkeypress event handler. This cause many problems for non-mouse users attempting to use the tool. Please watch the following videos for a demo of just a couple of the problems it causes in Tests and Quizzes:

      Demonstration of effect on buttons: http://screencast.com/t/KwnYrVCK

      Demonstration of effect on links: http://screencast.com/t/QRPKJI1v4

      How you reproduce this:
      Disconnect the mouse and try to navigate with the keyboard. Assuming that you know how interact with a website using keyboard only navigation, this simple test will very quickly show if it is possible to navigate or interact a feature using an input device other than the mouse. Be especially sure to test interactive features like forms, drop-down menus, expand/contract menus, etc.

      Suggestions:

      1) Simply remove the redundant onkeypress handler from links and form controls.

      2) Where onkeypress handlers are required, do not use onkeypress handlers that carry out actions without first testing which key was actually pressed. For instance, make sure only the appropriate keys activate an action (typically the enter and/or space keys). Typically it is inappropriate to let standard navigation keys (like tab, shift+tab, F6, shift+F6, any of the arrow keys (or their modified forms), the escape key, etc.) activate a "control".

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

              1.
              Accessibility: Remove onkeypress handler from hide/show timer bar button Sub-task Verified SAMIGO TEAM (Inactive)

              0%

              Original Estimate - 15 minutes
              Remaining Estimate - 15 minutes
              2.
              Accessibility: Remove onkeypress handler from multiple choice single correct delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              3.
              Accessibility: Remove onkeypress handler from multiple choice Multiple correct delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              4.
              Accessibility: Remove onkeypress handler from audio recording delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              5.
              Accessibility: Remove onkeypress handler from File Upload Delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              6.
              Accessibility: Remove onkeypress handler from fill in numeric delivery "What's this?" link Sub-task Verified SAMIGO TEAM (Inactive)  
              7.
              Accessibility: Remove onkeypress handler from fill in the blank delivery ("What's this?" link) Sub-task Verified SAMIGO TEAM (Inactive)  
              8.
              Accessibility: Remove onkeypress handler from matching delivery ("What's this?" link) Sub-task Verified SAMIGO TEAM (Inactive)  
              9.
              Accessibility: Remove onkeypress handlers from short answer delivery ("What's this?" link and "Model Answer" link) Sub-task Verified SAMIGO TEAM (Inactive)  
              10.
              Accessibility: Remove onkeypress handler from True/False delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              11.
              Accessibility: Remove onkeypress handler from model short answer link delivery Sub-task Verified SAMIGO TEAM (Inactive)  
              12.
              Accessibility: Remove onkeypress handler from Next, Previous, Save, Exit, Submit for Grading, etc. buttons Sub-task Verified SAMIGO TEAM (Inactive)  
              13.
              Accessibility: Remove onkeypress handler from buttons in delivery/tableOfContents.jsp Sub-task Verified SAMIGO TEAM (Inactive)  
              14.
              Accessibility: Remove onkeypress handlers from "Open" and "Close" links on Test/Quiz Settings page Sub-task Verified SAMIGO TEAM (Inactive)  
              15.
              Accessibility: deliverCalculatedQuestion.jsp - Remove redundant onkeypress handler from "What is this" link Sub-task Verified Steve Swinsburg  
              16.
              Accessibility: deliverMatrixChoicesSurvey.jsp - Remove redundant onkeypress handler from "What is this" link Sub-task CLOSED Steve Swinsburg  

                Activity

                  People

                  Assignee:
                  samigoteam SAMIGO TEAM (Inactive)
                  Reporter:
                  brichwin Brian Richwine
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Time Tracking

                      Estimated:
                      Original Estimate - 15 minutes
                      15m
                      Remaining:
                      Remaining Estimate - 15 minutes
                      15m
                      Logged:
                      Time Spent - Not Specified
                      Not Specified

                        Git Integration