Closed Bug 955609 Opened 10 years ago Closed 10 years ago

Tab key doesn't behave as expected in the new conversation tab.

Categories

(Instantbird Graveyard :: Conversation, defect)

x86
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhnt11, Assigned: nhnt11)

Details

Attachments

(1 file, 2 obsolete files)

*** Original post on bio 2168 at 2013-09-12 14:49:00 UTC ***

As reported by James Teh:

> My only other thought (and it's not particularly important) is that tabbing is
> a bit strange. First you land in the filter field. If you press tab, you hit
> the list. However, if you press shift+tab, you skip over the filter field and
> end up on the tab control, which is asymmetrical. Also, if you press tab while
> on the list, nothing happens. I would have expected it to return to the tab
> control.
*** Original post on bio 2168 at 2013-09-12 14:52:17 UTC ***

This was reported in comment 3 on bug 955598 (bio 2158) (https://bugzilla.mozilla.org/show_bug.cgi?id=955598 (bio 2158)#c2)
*** Original post on bio 2168 at 2013-09-12 14:53:19 UTC ***

I meant comment 2, sorry.
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2168 as attmnt 2877 at 2013-09-12 14:57:00 UTC ***

Don't handle the tab key in the keydown handler.
Attachment #8354647 - Flags: review?(benediktp)
Assignee: nobody → nhnt11
Comment on attachment 8354647 [details] [diff] [review]
Patch

*** Original change on bio 2168 attmnt 2877 at 2013-09-13 08:24:01 UTC ***

The patch fixes the problem for most cases. An edge case remains: there is no visible indication where the focus is when tabbing directly to the listbox without entering a filter string first.
Attachment #8354647 - Flags: review?(benediktp) → review-
Attached patch Patch 2 (obsolete) — Splinter Review
*** Original post on bio 2168 as attmnt 2882 at 2013-09-13 11:40:00 UTC ***

This adds a focus listener to the listbox which selects the first visible item if nothing is already selected.
Attachment #8354652 - Flags: review?(benediktp)
Comment on attachment 8354647 [details] [diff] [review]
Patch

*** Original change on bio 2168 attmnt 2877 at 2013-09-13 11:40:50 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354647 - Attachment is obsolete: true
Attached patch Patch 3Splinter Review
*** Original post on bio 2168 as attmnt 2883 at 2013-09-13 11:45:00 UTC ***

Store this.listbox in a temporary variable in the focus listener.
Attachment #8354653 - Flags: review?(benediktp)
Comment on attachment 8354652 [details] [diff] [review]
Patch 2

*** Original change on bio 2168 attmnt 2882 at 2013-09-13 11:45:33 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354652 - Attachment is obsolete: true
Attachment #8354652 - Flags: review?(benediktp)
*** Original post on bio 2168 at 2013-09-13 13:45:18 UTC ***

>An edge case remains: there is no visible indication where the focus is when 
>tabbing directly to the listbox without entering a filter string first.

I don't think this matters: For keyboard usage it should not matter what has focus (we make it so). Focus matters for screen reader users as it determines what is read out. It's not important to provide a visual indication.
*** Original post on bio 2168 at 2013-09-13 15:26:26 UTC ***

(In reply to comment #7)

> It's not important to provide a visual indication.

It's a bug to not to so. But I think it could be a different and much lower priority bug than this one (the bug here IMHO is 'the tab key doesn't work, breaking keyboard navigation').
*** Original post on bio 2168 at 2013-09-13 15:45:04 UTC ***

(In reply to comment #8)
> (In reply to comment #7)
> 
> > It's not important to provide a visual indication.
> 
> It's a bug to not to so. But I think it could be a different and much lower
> priority bug than this one (the bug here IMHO is 'the tab key doesn't work,
> breaking keyboard navigation').

Yes, it's a different bug. Imho the correct *visual* information to the user would be to keep the filterbox looking focused whenever the listbox OR the filterbox (but not the tab) has focus. Because that's the element where entered text will end up. (The listbox and the filterbox act as a single element for keyboard usage purposes.) The problem with this is that afaik for a11y reasons the listitems do have to receive focus when they are selected, so they are read out.

An interesting approach to a similar issue is used by the awesomebar in FX: It seems to me TAB just moves the selection down by one, Shift-TAB moves it up. The actual focus remains in the url field itself (at least, that's where the cursor is).
Comment on attachment 8354653 [details] [diff] [review]
Patch 3

*** Original change on bio 2168 attmnt 2883 at 2013-09-13 20:05:05 UTC ***

It's working fine now.
Attachment #8354653 - Flags: review?(benediktp) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 2168 at 2013-09-22 23:37:22 UTC ***

http://hg.instantbird.org/instantbird/rev/bc3b4cd331a1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.5
You need to log in before you can comment on or make changes to this bug.