Opened 11 years ago

Closed 3 years ago

#6343 closed defect (patchwelcome)

ComboBox: Impossible to set to an empty value using the keyboard when there is no "blank" choice

Reported by: Joseph Scheuhammer Owned by:
Priority: high Milestone: 1.13
Component: Accessibility Version: 1.0
Keywords: Cc: davidb, Douglas Hays
Blocked By: Blocking:

Description (last modified by Joseph Scheuhammer)

Consider the test page: .../dijit/tests/form/test_ComboBox.html

Steps to reproduce:

  1. Focus on the combobox designated "Dijit List test #1 (150% font):". This combobox initially displays the value "dijit.Editor".
  1. Erase that value such that the box is blank. The list of choices pops up.

3a. Dismiss the choice list via esc. "dijit.Editor" will reappear in the box as the choice.

3b. Alternatively, dismiss the choice by clicking outside of the list of choices. The box will remain empty.

If the user's intent is to leave the box empty, they can't do it using the keyboard.

Compare the above results with the combo box labelled "US State test 1 (200% Courier font):" (the first one on the test page). This combo box includes a "blank" choice at the top of its list, just above "Alabama". Here, users can use the keyboard to choose the "blank" choice and make the box empty.

Note that there is a general inconsistency here between keyboard and mouse operation: if dismissed by pressing esc, the choice reverts back to the last value; however, if dismissed by mouse click (e.g., clicking outside of the list), the result is the current value.

Change History (15)

comment:1 Changed 11 years ago by Joseph Scheuhammer

Description: modified (diff)

comment:2 Changed 11 years ago by bill

Cc: Douglas Hays added
Summary: Impossible to set a Combo box to empty using the keyboard when there is no "blank" choiceComboBox: Impossible to set to an empty value using the keyboard when there is no "blank" choice

I see... well ComboBox in general doesn't require a blank entry in the drop down. I suppose the problem is that hitting ESC while the drop down is open should just close the drop down, but not revert the value. In general we setup ESC to revert the value but in this case maybe you should need to hit ESC twice to do that (the first time closes the drop down, the second time reverts the value). BTW check to make sure this isn't an issue on DateTextBox etc.; if it is file another ticket for them.

comment:3 Changed 11 years ago by Joseph Scheuhammer

First, I am not proposing that every Combobox have a "blank" choice, but only that the ability to set the value to "blank" via the keyboard should be an option.

Secondly, as suggested, I started to look at XxxTextBox, and discovered that if the box is empty, and one tabs away, then it stays empty. I went back and tested that with Combobox -- it has the same behaviour. That is, at step 3a above, if one does a tab key press, and not esc, then the list is dismissed, and the value is blank. This might be the way to solve this issue. A downside is that keyboard focus is moved elsewhere -- the blind user presumably can't check the value without tabbing back to the box.

Part of the problem, I think, is that when the box is blank, the value list pops up automatically. Intuitively, pressing esc should get rid of that list. Perhaps if the list did not pop up until at least one character was typed (or if the user explicitly requested the list via down arrow), then there is no temptation to hit esc. Acceptance of the blank entry can be indicated by tab.

Finally, I observed identical behaviour with FilteringSelectWidget. Whatever is decided here should apply to that widget as well.

comment:4 Changed 11 years ago by Becky Gibson

Owner: changed from becka11y to Becky Gibson

comment:5 Changed 11 years ago by wolfram

Hitting ENTER instead of ESC makes the blank value stay, that looks right to me. And hitting ESC to say "oh, undo" seems common behaviour too.

my 2 cents

comment:6 Changed 11 years ago by bill

I wouldn't use the word "can't" but it's definitely inconvenient. Requires ESC --> select all --> delete, right? (I mention this because if it's possible to erase the value then I guess we don't need a fix for 1.1.1 necessarily.) I filed #6506 which has the same root cause as this bug but it's the wider issue of ESC reverting the value when (I think) it shouldn't.

comment:7 in reply to:  6 Changed 11 years ago by Joseph Scheuhammer

Replying to bill:

... Requires ESC --> select all --> delete, right?

No. When I tried that key sequence, the popup reappears shortly after the delete. I tried FF2, FF3, IE7, and IE6 on WinXP and Mac OS X Tiger.

FF3/Mac was the exception, but in an unexpected way. Here, "select all" immediately invoked the popup, and eliminated the selection of the text in the text box. Thus, I couldn't even get to the delete step with Minefield/Mac?.

FF3 details: Gecko/2008041804 Minefield/3.0pre

comment:8 Changed 11 years ago by Becky Gibson


I can get a blank value by performing the following steps:

  • tab to the dijit List test field. The entire value is selected
  • press backspace to clear (entire list is displayed but no text is in the list box)
  • press enter - list box closes, text box remains blank
  • tab away, text box remains blank

When ever I press enter when the textbox is blank the text box remains empty and the list is closed.

I think that this is acceptable behavior. I do agree that escape should work as discussed above but am moving to 1.2 rather than 1.1.1

comment:9 Changed 11 years ago by Becky Gibson

Milestone: 1.21.3

comment:10 Changed 10 years ago by bill

Milestone: 1.31.4

See #7893 for general ESC behavior we want to change to: stop using ESC to revert a value.

comment:11 Changed 10 years ago by Becky Gibson

Milestone: 1.4future

comment:12 Changed 8 years ago by Chris Mitchell

Owner: changed from Becky Gibson to Douglas Hays

reassign due to inactive committer. please triage accordingly.

comment:13 Changed 5 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:14 Changed 5 years ago by Douglas Hays

Status: assignedopen

comment:15 Changed 3 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: openclosed

If anyone wants to revisit this and work on a pull request, we'll consider it, but given the lack of activity over the past 7 years, I'm closing it out.

Note: See TracTickets for help on using tickets.