Closed Bug 361997 Opened 18 years ago Closed 18 years ago

Keyboard navigation problems with date picker

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: surkov)

References

Details

(Keywords: access, fixed1.8.0.12, fixed1.8.1.4)

Attachments

(3 files, 3 obsolete files)

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.
(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)?
Blocks: xformsa11y
Hardware: PC → All
> 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.
Attached file xul test (deleted) —
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?
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.
Attached patch patch (obsolete) (deleted) — Splinter Review
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
Attachment #250450 - Flags: review?(aaronr)
Status: NEW → ASSIGNED
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.
Attachment #250450 - Flags: review?(Olli.Pettay)
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.
Attachment #250450 - Flags: review?(Olli.Pettay)
Attached patch patch2 (obsolete) (deleted) — Splinter Review
(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.
Attachment #250450 - Attachment is obsolete: true
Attachment #251064 - Flags: review?(Olli.Pettay)
Attachment #250450 - Flags: review?(aaronr)
Attachment #251064 - Flags: review?(aaronr)
Attached file xhtml test (deleted) —
(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?
(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.
(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.
Attached patch patch3 (obsolete) (deleted) — Splinter Review
Attachment #251064 - Attachment is obsolete: true
Attachment #251532 - Flags: review?(aaronr)
Attachment #251064 - Flags: review?(aaronr)
Attachment #251064 - Flags: review?(Olli.Pettay)
Attachment #251532 - Flags: review?(Olli.Pettay)
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
Attachment #251532 - Flags: review?(aaronr) → review+
Arrow keys don't seem to work in XUL testcase.
Attached patch patch4 (deleted) — Splinter Review
(In reply to comment #16) > Arrow keys don't seem to work in XUL testcase. > Ah, sorry. Fixed.
Attachment #251532 - Attachment is obsolete: true
Attachment #252049 - Flags: review?(Olli.Pettay)
Attachment #251532 - Flags: review?(Olli.Pettay)
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
Attachment #252049 - Flags: review?(Olli.Pettay) → review-
(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?
Depends on: 365907
Comment on attachment 252049 [details] [diff] [review] patch4 Ok, discussed with Alex, and agreed that remaining XUL problems will be fixed in bug 365907.
Attachment #252049 - Flags: review- → review+
checked in on trunk by smaug. Marking bug fixed even, XUL tab problems will be adressed in bug 365907
Whiteboard: xf-to-branch
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
checked into 1.8 branch on 2007-04-12 checked into 1.8.0 branch on 2007-04-16
Whiteboard: xf-to-branch
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: