[Dojo-checkins] [dojo] #6416: _DateTimeTextBox: better a11y

dojo trac at dojotoolkit.org
Sat Jul 24 18:19:13 EDT 2010


#6416: _DateTimeTextBox: better a11y
-----------------------+----------------------------------------------------
 Reporter:  toonetown  |        Owner:  bill    
     Type:  defect     |       Status:  assigned
 Priority:  normal     |    Milestone:  1.6     
Component:  Dijit      |      Version:  1.1.0   
 Severity:  normal     |   Resolution:          
 Keywords:             |  
-----------------------+----------------------------------------------------

Old description:

> Both DateTextBox and TimeTextBox should pass certain keypress events
> through to the underlying widget.  This would actually be a change to
> _DateTimeTextBox.
>
> The calendar would support as many shortcuts from
> http://dev.aol.com/dhtml_style_guide as would be feasably possible
> (without shifting focus to the underlying calendar widget).
>
> The time picker would support up/down, and possibly others
> (pageup/pagedown for per-hour moves, etc).

New description:

 Both !DateTextBox and !TimeTextBox should pass certain keypress events
 through to the underlying widget.  This would actually be a change to
 _DateTimeTextBox.

 The calendar would support as many shortcuts from
 http://dev.aol.com/dhtml_style_guide as would be feasably possible
 (without shifting focus to the underlying calendar widget).

 The time picker would support up/down, and possibly others
 (pageup/pagedown for per-hour moves, etc).

--

Comment(by bill):

 (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 URL: <http://bugs.dojotoolkit.org/ticket/6416#comment:24>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list