Last Comment Bug 361997 - Keyboard navigation problems with date picker
: Keyboard navigation problems with date picker
Status: RESOLVED FIXED
: access, fixed1.8.0.12, fixed1.8.1.4
Product: Core
Classification: Components
Component: Keyboard: Navigation (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: alexander :surkov
:
Mentors:
: 348690 (view as bug list)
Depends on: 365907
Blocks: xformsa11y
  Show dependency treegraph
 
Reported: 2006-11-27 13:17 PST by Aaron Leventhal
Modified: 2007-04-23 16:37 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
xul test (772 bytes, application/vnd.mozilla.xul+xml)
2006-11-28 08:06 PST, alexander :surkov
no flags Details
patch (13.01 KB, patch)
2007-01-04 04:05 PST, alexander :surkov
no flags Details | Diff | Review
patch2 (13.19 KB, patch)
2007-01-10 05:24 PST, alexander :surkov
no flags Details | Diff | Review
xhtml test (1012 bytes, application/xhtml+xml)
2007-01-10 05:25 PST, alexander :surkov
no flags Details
patch3 (14.68 KB, patch)
2007-01-15 08:42 PST, alexander :surkov
aaronr: review+
Details | Diff | Review
patch4 (14.15 KB, patch)
2007-01-19 05:33 PST, alexander :surkov
bugs: review+
Details | Diff | Review

Description Aaron Leventhal 2006-11-27 13:17:01 PST
For this testcase:
https://bugzilla.mozilla.org/attachment.cgi?id=237411

Problems:
1) Up arrow misses top row of numbers. For example, in November 2007, if I try to up arrow from November 8 to November 1, it skips to the arrows
2) Pressing tab from the dropdown leaves focus in an unclear place
3) Related to #2 -- no very discoverable for screen reader users to get to next/previous month. They need to know to press Shift+Tab. It would be better if tab cycled through to those arrows as well.
Comment 1 alexander :surkov 2006-11-28 07:04:37 PST
(In reply to comment #0)
> 2) Pressing tab from the dropdown leaves focus in an unclear place

focus goes to next focusable element. focus is advanced to address bar in mentioned testcase.

> 3) Related to #2 -- no very discoverable for screen reader users to get to
> next/previous month. They need to know to press Shift+Tab. It would be better
> if tab cycled through to those arrows as well.
> 

Do you mean, focus should never leave opened calendar if press tab like it makes autocomplete textbox (fx address bar)?
Comment 2 Aaron Leventhal 2006-11-28 08:01:01 PST
> Do you mean, focus should never leave opened calendar if press tab like it
> makes autocomplete textbox (fx address bar)?
Yes.

Also, pageup/pagedown should move by month if they don't already. 

Try using this with a screen reader like Window-Eyes and imagine you don't know the UI. You would never guess to use Shift+Tab to find the month changing buttons.

Comment 3 alexander :surkov 2006-11-28 08:06:34 PST
Created attachment 246799 [details]
xul test

Aaron, please look at xul calendar. It's more buggy than xhtml analogue but it has extended UI. I like to see something similiar for xhtml calendar. How should keyboard combinations (PgUp/PgDown, Tab/ShiftTab) work for it?
Comment 4 Aaron Leventhal 2006-11-28 11:36:20 PST
I think it should work about the same, except that when you tab to the month or year spinbuttons I suggest they work like comboboxes. Up/down when those are focused will change the item by 1, and F4 or Alt+Down arrow (I think ctrl+space on mac) will open a list of choices.

Pageup/pagedown when in the grid should move by month.

Another issue with the xforms datepicker is that the focus outlines look weirdly thin when they are on the prev/next month buttons.
Comment 5 alexander :surkov 2007-01-04 03:55:15 PST
*** Bug 348690 has been marked as a duplicate of this bug. ***
Comment 6 alexander :surkov 2007-01-04 04:05:22 PST
Created attachment 250450 [details] [diff] [review]
patch

1) enclosing tab/shift+tab inside calendar in datepicker (only for xhtml, For xul I save it for bug 365907).
2) Fixed up arrow wrong behaviour on second line
3) Fixed arrow havigation for xul calendar
4) Fixed focus lost for xul calendar
5) Fixed pressing tab from the dropdown leaves focus in an unclear place
6) Pageup/pagedown increment/decrement month
7) Fixed focus outlines look weirdly thin when they are on the prev/next month buttons
Comment 7 aaronr 2007-01-05 17:05:10 PST
I don't really have a problem with the code in the patch.  But I also don't have a build that I can try out the patch with to make sure that the key navigation stuff, etc. makes sense from a user perspective.  Hopefully by Monday I'll have a build on which I can try it out.
Comment 8 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-01-09 12:46:36 PST
Comment on attachment 250450 [details] [diff] [review]
patch

As I explained on IRC, doesn't quite work in Linux. Tabbing from datepicker keeps datepicker open and I haven't found a way to close it without using mouse.
Comment 9 alexander :surkov 2007-01-10 05:24:08 PST
Created attachment 251064 [details] [diff] [review]
patch2

(In reply to comment #8)
> (From update of attachment 250450 [details] [diff] [review])
> As I explained on IRC, doesn't quite work in Linux. Tabbing from datepicker
> keeps datepicker open and I haven't found a way to close it without using
> mouse.
> 

I got you wrong. Tabbing isn't work properly XUL datepicker (I assume to implement this in bug 365907).
Escape fixed.
Instead tabenclose I use internaltabhandling like you supposed.
Comment 10 alexander :surkov 2007-01-10 05:25:34 PST
Created attachment 251065 [details]
xhtml test
Comment 11 aaronr 2007-01-10 15:54:16 PST
(In reply to comment #6)
> Created an attachment (id=250450) [details]
> patch
> 
> 1) enclosing tab/shift+tab inside calendar in datepicker (only for xhtml, For
> xul I save it for bug 365907).

You missed AaronL's comment about 'no very discoverable for screen reader users to get to next/previous month. They need to know to press Shift+Tab. It would be better if tab cycled through to those arrows as well.'  Or did you guys decide not to do that?  Running the fix on the xhtml testcase, pressing tab doesn't cycle between the 'months' buttons.  Neither does shift+tab.  Using the left/right key does, though.

As a nit, if the focus were on a day in the dropdown and I hit the tab key, I'd expect the focus to go to the 'nextMonth' button and shift+tab to shift focus from the day to the 'prevMonth' button.  But that's not a big thing.

> 2) Fixed up arrow wrong behaviour on second line

not fixed on xhtml testcase you attached to bug.  If current date is 2007-01-10, I can't hit the up arrow to get to 2007-01-03

> 3) Fixed arrow havigation for xul calendar
> 4) Fixed focus lost for xul calendar
> 5) Fixed pressing tab from the dropdown leaves focus in an unclear place
> 6) Pageup/pagedown increment/decrement month
> 7) Fixed focus outlines look weirdly thin when they are on the prev/next month
> buttons

To me this looks the same on a trunk build with the fix as it does on FF2 with 0.7.0.1.  What should it look like?

> 

In the XUL calendar, I also don't get how to move focus up to the Month or Year spin buttons.  Is that going to be part of your fix for bug 365907?
Comment 12 alexander :surkov 2007-01-11 06:23:06 PST
(In reply to comment #11)
> (In reply to comment #6)
> > Created an attachment (id=250450) [details] [details]
> > patch
> > 
> > 1) enclosing tab/shift+tab inside calendar in datepicker (only for xhtml, For
> > xul I save it for bug 365907).
> 
> You missed AaronL's comment about 'no very discoverable for screen reader users
> to get to next/previous month. They need to know to press Shift+Tab. It would
> be better if tab cycled through to those arrows as well.'  Or did you guys
> decide not to do that?  Running the fix on the xhtml testcase, pressing tab
> doesn't cycle between the 'months' buttons.  Neither does shift+tab.  Using the
> left/right key does, though.
> 
> As a nit, if the focus were on a day in the dropdown and I hit the tab key, I'd
> expect the focus to go to the 'nextMonth' button and shift+tab to shift focus
> from the day to the 'prevMonth' button.  But that's not a big thing.

No, I didn't miss. It should work. Do you test this on trunk?

> > 2) Fixed up arrow wrong behaviour on second line
> 
> not fixed on xhtml testcase you attached to bug.  If current date is
> 2007-01-10, I can't hit the up arrow to get to 2007-01-03

The same as above.

> To me this looks the same on a trunk build with the fix as it does on FF2 with
> 0.7.0.1.  What should it look like?

> > 3) Fixed arrow havigation for xul calendar

Arrows should change focused day in xul calendar.

> > 4) Fixed focus lost for xul calendar

When I open calendar then focus is in nowhere.

> > 5) Fixed pressing tab from the dropdown leaves focus in an unclear place

When textfield of datepicker is focused then tabbing moved focus to dropmarker but dropmarker wasn't outlined.

> > 6) Pageup/pagedown increment/decrement month

Pressing PG_UP/PG_DOWN will increment/decrement month in calendar.

> > 7) Fixed focus outlines look weirdly thin when they are on the prev/next 
> month buttons

Outline had gray color, now it is black.

> In the XUL calendar, I also don't get how to move focus up to the Month or Year
> spin buttons.  Is that going to be part of your fix for bug 365907?
> 

Yes, I think to replace current month/year controls with spin controls that are focusable.
Comment 13 aaronr 2007-01-11 12:41:05 PST
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #6)
> > > Created an attachment (id=250450) [details] [details] [details]
> > > patch
> > > 
> > > 1) enclosing tab/shift+tab inside calendar in datepicker (only for xhtml, For
> > > xul I save it for bug 365907).
> > 
> > You missed AaronL's comment about 'no very discoverable for screen reader users
> > to get to next/previous month. They need to know to press Shift+Tab. It would
> > be better if tab cycled through to those arrows as well.'  Or did you guys
> > decide not to do that?  Running the fix on the xhtml testcase, pressing tab
> > doesn't cycle between the 'months' buttons.  Neither does shift+tab.  Using the
> > left/right key does, though.
> > 
> > As a nit, if the focus were on a day in the dropdown and I hit the tab key, I'd
> > expect the focus to go to the 'nextMonth' button and shift+tab to shift focus
> > from the day to the 'prevMonth' button.  But that's not a big thing.
> 
> No, I didn't miss. It should work. Do you test this on trunk?

Yep, I tested it on the trunk with your 'patch 2'.  I see the page up and page down switching the months so I know that your patch is applied.  And my 'about Minefield' gives me back -> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070109 Minefield/3.0a2pre

Here is what I see:

1) Load 'xhtml test' from the bug
2) tab focus to the date picker and hit 'F4' to get the dropdown.  Focus was on the January 11th day.
3) I hit tab key, focus moves to 'prevMonth' pushbutton.
4) I hit tab key, nothing happens.  Focus stays on the 'prevMonth' pushbutton.

> 
> > > 2) Fixed up arrow wrong behaviour on second line
> > 
> > not fixed on xhtml testcase you attached to bug.  If current date is
> > 2007-01-10, I can't hit the up arrow to get to 2007-01-03
> 
> The same as above.

Here is a specific scenario I see failing:

1) Load 'xhtml test' from the bug
2) tab focus to the date picker and hit 'F4' to get the dropdown.  Focus was on the January 11th day.
3) Press the down arrow twice to move the current temporary selection down two weeks and then cursor over to that Sunday (January 21st in my case).
4) Press the up arrow once.  That moves the current temporary selection to January 14th.
5) Press the up arrow once.  That SHOULD move the current temporary selection to January 7th but on my build it goes to the 'next month' pushbutton.
Comment 14 alexander :surkov 2007-01-15 08:42:54 PST
Created attachment 251532 [details] [diff] [review]
patch3
Comment 15 aaronr 2007-01-17 11:37:19 PST
Comment on attachment 251532 [details] [diff] [review]
patch3

looks ok to me except that you are adding a new line at the end of widgets-xul.css that you probably shouldn't.

With that removed, r=me
Comment 16 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-01-19 03:44:29 PST
Arrow keys don't seem to work in XUL testcase.
Comment 17 alexander :surkov 2007-01-19 05:33:22 PST
Created attachment 252049 [details] [diff] [review]
patch4

(In reply to comment #16)
> Arrow keys don't seem to work in XUL testcase.
> 

Ah, sorry. Fixed.
Comment 18 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-01-22 12:49:07 PST
Comment on attachment 252049 [details] [diff] [review]
patch4

tab doesn't work the same way in XUL and XHTML testcases, or I'd say it doesn't really work in XUL. If I tab when picker is open, I can't tab back to picker
Comment 19 alexander :surkov 2007-01-22 18:07:02 PST
(In reply to comment #18)
> (From update of attachment 252049 [details] [diff] [review])
> tab doesn't work the same way in XUL and XHTML testcases, or I'd say it doesn't
> really work in XUL. If I tab when picker is open, I can't tab back to picker
> 

I don't handle tab for XUL in this patch. I'd like to adress this in bug 365907 after spin widgets when will be more clear what tab should do. Does it work for you?
Comment 20 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-01-23 00:24:08 PST
Comment on attachment 252049 [details] [diff] [review]
patch4

Ok, discussed with Alex, and agreed that remaining XUL problems will be fixed in bug 365907.
Comment 21 alexander :surkov 2007-01-23 00:40:32 PST
checked in on trunk by smaug. Marking bug fixed even, XUL tab problems will be adressed in bug 365907
Comment 22 aaronr 2007-04-23 16:37:12 PDT
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16

Note You need to log in before you can comment on or make changes to this bug.