E-mail List Archives
Thread: Expected behavior for listbox selection
Number of posts in this thread: 7 (In chronological order)
From: Catt, James
Date: Fri, Dec 07 2018 1:20PM
Subject: Expected behavior for listbox selection
No previous message | Next message →
Hi everyone, curious to see what you all think of this issue.
We've been building a form with a listbox coded as per the ARIA guidelines, but *not* using "selection follows focus" because the selection changes the output of an aria-live region, and thus the screen reader would read out way too much every time the user changed the option. Instead, we've been requiring the user to press Enter to select the appropriate option. It works fine except with JAWS, where it causes JAWS to exit forms mode (and the user has to move focus away from the control and back before they can change the option with arrow keys again).
I'm guessing this is because JAWS expects the selection key to be Spacebar instead of Enter. The ARIA guidelines don't specify which key should be used for selecting in a single-select listbox, but for multiselect listboxes it says Spacebar. Some people on our team felt that Spacebar wasn't intuitive however, so we're leaning towards supporting both, with hidden instruction text for screen readers that says to press Spacebar (but doesn't mention Enter, even though it will work for non-JAWS users).
My questions to the group are:
1. Is spacebar, in fact, the expected/standard key for selecting in a listbox?
2. What do you think of our solution? Can you see any drawbacks to redundantly supporting Enter?
Thanks in advance for your input!
James Catt
Inclusive Design Consultant, OLB | CIBC Digital
From: Sean Murphy
Date: Fri, Dec 07 2018 1:38PM
Subject: Re: Expected behavior for listbox selection
← Previous message | Next message →
Yes, on a windows machine This will select a single item This is the standard keyboard command and is not windows screem reader specific
Sean
My experience is the part
> On 8 Dec 2018, at 7:20 am, Catt, James < = EMAIL ADDRESS REMOVED = > wrote:
>
> Hi everyone, curious to see what you all think of this issue.
>
> We've been building a form with a listbox coded as per the ARIA guidelines, but *not* using "selection follows focus" because the selection changes the output of an aria-live region, and thus the screen reader would read out way too much every time the user changed the option. Instead, we've been requiring the user to press Enter to select the appropriate option. It works fine except with JAWS, where it causes JAWS to exit forms mode (and the user has to move focus away from the control and back before they can change the option with arrow keys again).
>
> I'm guessing this is because JAWS expects the selection key to be Spacebar instead of Enter. The ARIA guidelines don't specify which key should be used for selecting in a single-select listbox, but for multiselect listboxes it says Spacebar. Some people on our team felt that Spacebar wasn't intuitive however, so we're leaning towards supporting both, with hidden instruction text for screen readers that says to press Spacebar (but doesn't mention Enter, even though it will work for non-JAWS users).
>
> My questions to the group are:
>
>
> 1. Is spacebar, in fact, the expected/standard key for selecting in a listbox?
> 2. What do you think of our solution? Can you see any drawbacks to redundantly supporting Enter?
>
> Thanks in advance for your input!
>
> James Catt
> Inclusive Design Consultant, OLB | CIBC Digital
>
> > > >
From: glen walker
Date: Fri, Dec 07 2018 3:11PM
Subject: Re: Expected behavior for listbox selection
← Previous message | Next message →
I'm with Sean. I would expect space to select the item, like space selects
a checkbox, radio button, and button (although of course a button allows
enter too), but then I'm a keyboard user and have been for years (decades).
With multiselect listboxes, if the up/down arrow keys change the selection
(which I understand you're not doing), then you have to use ctrl+up/down to
move the focus within the listbox without changing the selection, then
ctrl+space to add a selection to the list. I think some browsers don't
honor the ctrl+up/down to move the focus within the listbox.
From: Isabel Holdsworth
Date: Mon, Dec 10 2018 2:48AM
Subject: Re: Expected behavior for listbox selection
← Previous message | Next message →
Enter has traditionally been used to submit forms, so I'd personally
steer away from it as a selection key.
If the listbox is marked up properly, there's no need to add hidden
screenreader instructions. When the focus lands on an element,
screenreaders typically speak the element's name ("Pizza toppings"),
its type ("listbox"), its current value if one is selected ("Cheese"),
and instructions for interacting with the element ("Press Space to
select an item").
Cheers, Isabel
On 07/12/2018, glen walker < = EMAIL ADDRESS REMOVED = > wrote:
> I'm with Sean. I would expect space to select the item, like space selects
> a checkbox, radio button, and button (although of course a button allows
> enter too), but then I'm a keyboard user and have been for years (decades).
>
> With multiselect listboxes, if the up/down arrow keys change the selection
> (which I understand you're not doing), then you have to use ctrl+up/down to
> move the focus within the listbox without changing the selection, then
> ctrl+space to add a selection to the list. I think some browsers don't
> honor the ctrl+up/down to move the focus within the listbox.
> > > > >
From: Mohith BP
Date: Mon, Dec 10 2018 3:34AM
Subject: Re: Expected behavior for listbox selection
← Previous message | Next message →
Hi James Catt,
In my experience I feel your team is right spacebar selecting option
in an single select is counter intuit.
The HTML <select> options are also selected with enter and mostly
users expect enter to select the option on web.
I think your approach is fine unless the hidden extra information is
read by all the screen readers in the end and it is not too verbose.
It would be good if the screen reader reads it only once when focus is
set on the list box. May be through aria-describedby.
I think JAWS users should not be moving to another element and come
back to the listbox in order to change the selection as pressing enter
again should turn on the forms mode and the focus will be on the
selected option.
Thanks & Regards,
Mohith B. P.
On 12/8/18, Catt, James < = EMAIL ADDRESS REMOVED = > wrote:
> Hi everyone, curious to see what you all think of this issue.
>
> We've been building a form with a listbox coded as per the ARIA guidelines,
> but *not* using "selection follows focus" because the selection changes the
> output of an aria-live region, and thus the screen reader would read out way
> too much every time the user changed the option. Instead, we've been
> requiring the user to press Enter to select the appropriate option. It works
> fine except with JAWS, where it causes JAWS to exit forms mode (and the user
> has to move focus away from the control and back before they can change the
> option with arrow keys again).
>
> I'm guessing this is because JAWS expects the selection key to be Spacebar
> instead of Enter. The ARIA guidelines don't specify which key should be used
> for selecting in a single-select listbox, but for multiselect listboxes it
> says Spacebar. Some people on our team felt that Spacebar wasn't intuitive
> however, so we're leaning towards supporting both, with hidden instruction
> text for screen readers that says to press Spacebar (but doesn't mention
> Enter, even though it will work for non-JAWS users).
>
> My questions to the group are:
>
>
> 1. Is spacebar, in fact, the expected/standard key for selecting in a
> listbox?
> 2. What do you think of our solution? Can you see any drawbacks to
> redundantly supporting Enter?
>
> Thanks in advance for your input!
>
> James Catt
> Inclusive Design Consultant, OLB | CIBC Digital
>
> > > > >
From: Jonathan Avila
Date: Tue, Dec 11 2018 8:56AM
Subject: Re: Expected behavior for listbox selection
← Previous message | Next message →
> Enter has traditionally been used to submit forms, so I'd personally steer away from it as a selection key.
I agree -- I am always hesitant to use enter in fear of accidently submitting a form and usually try space first.
Jonathan
From: Catt, James
Date: Fri, Dec 14 2018 11:46AM
Subject: Re: Expected behavior for listbox selection
← Previous message | No next message
Thanks for your input everyone!
-James