-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combobox: Escape key should not clear current input #1066
Comments
I agree, I think this might also get in the way of 1.4.13/Content on hover or focus, since it's currently not possible to enter a value in the input without keeping the menu open. |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<MarkMccarthy> TOPIC: Combobox ESC key clear current selection<MarkMccarthy> mck: we talked about this once before, but didn't get it minuted or in the issue <jemma> https://github.com//issues/1066 <MarkMccarthy> github: https://github.com//issues/1066 <MarkMccarthy> mck: the last time we talked about this, it seemed like there was genereal consensus that, by default, ESC should -not- clear content. that's what I recall <MarkMccarthy> mck: just wanted to make sure I'm remembering right <MarkMccarthy> mck: Evan Y did note that it clears it in Finder on Mac, but someone else mentioned it clears -focus- on the Mac search. I confirmed this <MarkMccarthy> jemma: is the Search field a combobox? <MarkMccarthy> mck: I'm pretty sure <MarkMccarthy> mck: In Finder, it doesn't actually say "combobox" <MarkMccarthy> mck: it says "search text field". maybe it just -looks- like a combobox <MarkMccarthy> mck: hitting ESC closes the popup and my text is still there, if I hit ESC again, then focus goes back to list view. I'd expect text to be gone in that case <MarkMccarthy> mck: so maybe it's not a combobox <MarkMccarthy> jemma: right <MarkMccarthy> mck: So examples with Comboboxes? <jemma> mark: when I tested it with window, first esc collapse the text but does not clear the text <MarkMccarthy> MarkMccarthy: Focus doesn't leave the file explorer combobox unless ESC is pressed twice <MarkMccarthy> mck: let's not model off of OS examples <MarkMccarthy> group: [laughter] <MarkMccarthy> mck: another sort of native one is in browsers' address bars. hitting ESC here collapses it, second press clears it, whaddya know <MarkMccarthy> mck: That was with Firefox <MarkMccarthy> MarkMccarthy: I see this behavior in Chrome and ChromeEdge too <MarkMccarthy> jemma: so why does this matter? <MarkMccarthy> mck: because we got some feedback this -shouldn't- happen. but it seems like this happens with the -second- press <MarkMccarthy> mck: so maybe it's an optional behavior. maybe we should modify the pattern so if the listbox is collapsed and the textbox is not empty, pressing esc optionally clears it? <MarkMccarthy> jemma: an option is fine, but we might not want to go deeper <MarkMccarthy> jemma: Other opinions? <MarkMccarthy> mck: maybe I'll propose wording back to the OP that it's optional to clear IF the popup is collapsed <MarkMccarthy> mck: examples would be address bars in chrome and firefox <MarkMccarthy> jemma: okay, i'll assign to you Matt |
For issue #1066, revises description of escape behavior. Escape may optionally clear the text box, but only if the popup is hidden before escape is pressed. Previously, the pattern implied both could happen with a single press of escape, which is inconsistent with any known implementations.
For issue #1066, revises description of escape behavior. Escape may optionally clear the text box, but only if the popup is hidden before escape is pressed. Previously, the pattern implied both could happen with a single press of escape, which is inconsistent with any known implementations.
Combobox Pattern: Revise Escape behavior (pull #1129) For issue #1066, revises description of escape behavior. Escape may optionally clear the text box, but only if the popup is hidden before escape is pressed. Previously, the pattern implied both could happen with a single press of escape, which is inconsistent with any known implementations.
Commit 315a4dd fixed this in the pattern but not in the examples. |
@mcking65 I was looking at the JQuery combobox and the Escape key has the following behavior:
Is this what we want for our comboboxes? |
…ttern (pull #1334) Fixes #860 and #1066: * Revise Escape key documentation to reflect expected behavior * updated escape key behavior to match combobox pattern * Make escape hide the popup if it's shown, regardless of where focus is * Update the corresponding test to no longer expect a failure (fixes #860). * Remove comment about failing test Co-authored-by: Jon <[email protected]> Co-authored-by: Simon Pieters <[email protected]>
Combobox with grid popup: Make escape key behavior consistent with pattern (pull #1334) Fixes #860 and #1066: * Revise Escape key documentation to reflect expected behavior * updated escape key behavior to match combobox pattern * Make escape hide the popup if it's shown, regardless of where focus is * Update the corresponding test to no longer expect a failure (fixes #860). * Remove comment about failing test Co-authored-by: Jon <[email protected]> Co-authored-by: Simon Pieters <[email protected]>
…ttern (pull w3c#1334) Fixes w3c#860 and w3c#1066: * Revise Escape key documentation to reflect expected behavior * updated escape key behavior to match combobox pattern * Make escape hide the popup if it's shown, regardless of where focus is * Update the corresponding test to no longer expect a failure (fixes w3c#860). * Remove comment about failing test Co-authored-by: Jon <[email protected]> Co-authored-by: Simon Pieters <[email protected]>
Currently ARIA 1.1 Combobox example says about ESC key that it:
To my feeling textbox clearing contradicts almost everything users are used to and expect.
Escape key usually means "Abort what you are currently doing". From that point of view clearing is definitely an unwanted side effect.
Native browser select does not clear selection on escape key.
Every UI library I am aware of, which implements combobox pattern, does not clear textbox as well. Ant design, react-select, select2 to name a few and those are very popular.
to-do list added by Matt
This will be fixed in APG 1.2 with the following:
The text was updated successfully, but these errors were encountered: