#5119 closed defect (fixed)
ColorPalette: Focus set on doc not on cell
Reported by: | ptbrunet | Owned by: | simonjb |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | [email protected]…, Becky Gibson | |
Blocked By: | Blocking: |
Description
Go to .../dojotoolkit/dijit/tests/test_ColorPalette.html and set focus on the first cell, press ctrl tab twice to move focus away and back. The focus moves back to the first cell. Now move focus to some other cell and do the same thing, focus doesn't move to the orignal cell but instead to the document.
Attachments (1)
Change History (10)
comment:1 Changed 15 years ago by
comment:2 Changed 14 years ago by
Owner: | set to simonjb |
---|
comment:3 Changed 14 years ago by
Status: | new → assigned |
---|
comment:4 Changed 14 years ago by
Ctrl Tab moves between tabs. I should have said Alt Tab in my opening comment - but the same issue exists with Ctrl Tab.
comment:5 Changed 14 years ago by
Cc: | Becky Gibson added |
---|
I've been having a look at this. The ColorPalette dynamically sets tabindex="0" on the img cell with focus, rather than setting tabindex="0" on the ColorPalette widget and redirecting focus with focus() (as the menu and toolbar do). Moving to the menu and toolbar model will fix this bug. However, Firefox cannot focus() img elements with tabindex="-1". I have filed a bug against Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=417760
Fixing the Mozilla bug won't really help us though as FF2 would not be fixed (I'm thinking). So, a possible solution would be to modify the ColorPalette such that the cell imgs are wrapped in a div, and focus the div.
comment:6 Changed 14 years ago by
Or, if it does get fixed in FF3 we could just live with the bug in FF2.
comment:7 Changed 14 years ago by
I could live with this bug in FF2 as long as the color palette is still keyboard accessible, of course :-). Or, if we wrap the img elements with another element, could it be a span rather than a div since divs are now getting put in the a11y hierarchy? I didn't look at the code so there is probably some requirement (like sizing) for using a div).
Changed 14 years ago by
Attachment: | 5119c.diff added |
---|
comment:8 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [12831]) Wrap the ColorPalette? imgs in spans as Firefox cannot programmatically focus imgs with tabindex=-1; fixes #5119
This might be related: Go to the button test and put focus on one of the drop down menus (including the palette dropdown), press ctrl Tab twice, no focus is fired and pressing tab doesn't do anything.