Opened 12 years ago

Closed 12 years ago

#4078 closed defect (fixed)

color palete from combo button - pressing tab goes to wrong place

Reported by: ptbrunet Owned by: simonjb
Priority: high Milestone: 1.0
Component: Accessibility Version: 0.9
Keywords: Cc: brunet@…, bill, Becky Gibson
Blocked By: Blocking:

Description

Open the button test case, tab to the color dropdown button, press downarrow to open the palette, press tab, focus should go to the next button, but it goes to the address bar.

Attachments (1)

tab.diff (1.3 KB) - added by simonjb 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by Becky Gibson

Actually for dojo 1.0 pressing tab when focus is on the color drop down should close the drop down and put focus back on the button. This is how the other drop down buttons work.

Ideally we would eventually like the behavior of pressing tab with focus on the drop down to close the drop down and put focus on the next focusable item on the page but currently it is too difficult to determine the next focusable item.

comment:2 Changed 12 years ago by simonjb

Owner: changed from Becky Gibson to simonjb

comment:3 Changed 12 years ago by simonjb

Status: newassigned

comment:4 Changed 12 years ago by simonjb

Cc: bill added

comment:5 Changed 12 years ago by simonjb

Cc: Becky Gibson added

Currently popped up widgets do their own tab handling. In the case of Menu, the tab-handling code calls this.onExecute() to close the open menus. I initially implemented a similar strategy for ColorPalette. However, I ran into a small difficulty. The test_ColorPalette.html test file contains color palettes that are in the document, not popups. To support non-popup ColorPalettes, the tab-handling code would need to know whether it is being run in a popped-up palette or one that is in a document (to know to dojo.stopEvent() the tab or not). Adding logic to determine if we where in a popup or not would have been one solution.

However, I thought I'd try another. I had a go at implementing tab handling in the same way that esc is handled -- in dijit.popup.open() rather than in each widget. I needed to provide a way to cancel a whole stack of popups (menu and submenus) in addition to just the top one. To do this I added an argument to onCancel: onCancel(closeAll).

I'd love to get your comments on these options and on the attached implementation.

comment:6 Changed 12 years ago by ptbrunet

Cc: brunet@… added; ptbrunet removed

comment:7 Changed 12 years ago by simonjb

Updated the patch -- added a test for widget.onCancel to the esc and tab handler.

Changed 12 years ago by simonjb

Attachment: tab.diff added

comment:8 Changed 12 years ago by simonjb

Updated (and greatly simplified) the patch after discussion with bill on irc.

comment:9 Changed 12 years ago by simonjb

Resolution: fixed
Status: assignedclosed

(In [10407]) Implement tab handling in dijit.popup.open(). Fixes #4078.

Note: See TracTickets for help on using tickets.