WebAIM - Web Accessibility In Mind

E-mail List Archives

Combobox: what should the Esc key do?

for

From: Lynn Holdsworth
Date: Apr 10, 2018 7:50AM


Hi all,

I'm creating a combobox widget, and wonder what's the most appropriate
behaviour for the Esc key when using a screenreader?

On its own, when the Esc key is pressed the textbox is left with the
value the user typed into it, and the listbox that dropped down below
it disappears.

When using JAWS or NVDA, the screenreader grabs the Esc key and
interprets it as an instruction to leave forms mode. Pressing Esc a
second time triggers the combobox's standard behaviour. I don't feel
that this is intuitive for the user.

Would it be better if this could work the other way round: pressing
Esc the first time hides the dropdown list, and a second press takes
the screenreader out of forms mode? I think I could achieve this by
adding an application role to the wrapping div and then removing it
once the Esc key has been pressed.

I'd really appreciate your thoughts on this.

Cheers, Lynn