Changes between Version 7 and Version 24 of Ticket #6416

Jul 24, 2010, 10:19:13 PM (10 years ago)

(In [22556]) Fix Calendar to handle keypress events forwarded from DateTextBox, thus making the DateTextBox's calendar drop down keyboard accessible.

Remaining issues include:

  • Needs review for screen reader support (if that's possible to support). One possible modification is to make every keystroke change the value in the <input> field, so that the screen reader knows what happened.
  • Also, need to add automated tests (after the a11y review).
  • ENTER key handling: in Calendar, every arrow key press changes the Calendar's value, firing onChange(). Note the difference from ColorPalette, which only fires onChange() upon the ENTER/SPACE key. The difference is because ColorPalette cells gets focus and using the arrow keys just changes the focused cell, rather than changing the value... whereas Calendar as a drop down doesn't focus at all.

Normally onChange() makes dijit.popup() report an onExecute event, which then makes _HasDropDown close the drop down. Working around this now by adding an explicit onExecute() method to Calendar which is only called on the ENTER/SPACE key. But I only intended the onExecute() callback to be used for fancy drop downs like TooltipDialog. Maybe there's a better way to handle this, perhaps flagging Calendar as an always-fires-onchange type widget and monitoring for ENTER key in _HasDropDown itself.

  • Fix key repeat. Typematic never worked for TimeTextBox because of complications with forwarding the key events from the TimeTextBox to the _TimePicker. However, key repeat did work because we were attaching to the onkeypress event. _HasDropDown currently attaches to onkeyup rather than onkeypress. Switching it to onkeypress is not trivial, because _HasDropDown also has an onkeydown handler which calls evt.preventDefault(), which on IE makes the onkeypress event not fire for ENTER/SPACE key. (In other words, need to be careful that we don't break ENTER/SPACE key handling.)


  • Ticket #6416

    • Property Reporter changed from nathan to Nathan Toone
    • Property Milestone changed from 1.2 to 1.6
    • Property Owner changed from nathan to bill
  • Ticket #6416 – Description

    v7 v24  
    1 Both DateTextBox and TimeTextBox should pass certain keypress events through to the underlying widget.  This would actually be a change to _DateTimeTextBox.
     1Both !DateTextBox and !TimeTextBox should pass certain keypress events through to the underlying widget.  This would actually be a change to _DateTimeTextBox.
    33The calendar would support as many shortcuts from as would be feasably possible (without shifting focus to the underlying calendar widget).