Opened 13 years ago
Closed 13 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: | [email protected]…, 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)
Change History (10)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | changed from Becky Gibson to simonjb |
---|
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
comment:4 Changed 13 years ago by
Cc: | bill added |
---|
comment:5 Changed 13 years ago by
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 13 years ago by
Cc: | [email protected]… added; ptbrunet removed |
---|
comment:7 Changed 13 years ago by
Updated the patch -- added a test for widget.onCancel to the esc and tab handler.
Changed 13 years ago by
comment:8 Changed 13 years ago by
Updated (and greatly simplified) the patch after discussion with bill on irc.
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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.