formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

[BUG] Unable to focus select menu search input using keyboard

Open gavinorland opened this issue 5 years ago • 15 comments

Environment

  • Formio.js version: 4.11.0
  • Browser: Chrome

Steps to Reproduce

  1. Please see this fiddle using Formio
  2. And this one using only Choices (same version)

Expected behaviour

It should be possible to enter text into the search input of a select menu at all times without needing to click on it with the mouse.

Observed behaviour

This is only possible with the Choices version.

I wonder if you have any idea what might be the problem behind this? At the moment our work can't pass accessibility requirements because of it.

gavinorland avatar Jul 14 '20 21:07 gavinorland

Hello @gavinorland,

Thank you for reaching out and providing JSFiddle of the 2 versions of the select component. However, we are not experiencing any issues with the select menu JSFiddle.

Here is a recording of testing both: https://share.getcloudapp.com/jkuQBbvx

We incorporate choices.js in our select component. We also have an option to use an HTML5 widget as well. Here are our examples of our select component:https://formio.github.io/formio.js/app/examples/select.html

I hope that this helps.

Thank you!

wag110894 avatar Jul 14 '20 21:07 wag110894

Thanks for getting back to me so quickly @wag110894. I've looked at your video but I'm not sure we're looking for the same thing here. Did you see the instructions in the fiddles, too?

The issue is that in the Choices select menu a cursor remains in its search input box at all times, whereas in the Formio version this focus is lost when an item is selected, and can't be regained using the keyboard. (The same issue occurs in your own example, too.)

Update: I've clarified the description here and the instructions in the fiddles.

gavinorland avatar Jul 14 '20 22:07 gavinorland

@travist It looks like you have worked on this specific area of the Select component code, but I'm not entirely clear on where/what is causing this.

gavinorland avatar Jul 15 '20 07:07 gavinorland

@gavinorland Apologies for the confusion. We are able to replicate this issue and have added it to our backlog. For reference, the ticket number is FJS-1073. We welcome a pull request and also have a process to expedite if you are interested.

Please contact [email protected] for more information on expediting.

We will let you know once this issue has been resolved.

Thank you.

wag110894 avatar Jul 15 '20 15:07 wag110894

Many thanks @wag110894 - I'll get in touch if I can see what the issue is at this end or if we wish to expedite.

gavinorland avatar Jul 15 '20 16:07 gavinorland

Sounds great!

wag110894 avatar Jul 15 '20 17:07 wag110894

@wag110894 Any update on whether this particular ticket is being worked on at the moment or has since been resolved?

SalTor avatar Oct 29 '20 15:10 SalTor

Hello @SalTor,

This item is currently in our backlog. We welcome a pull request or we have an option to expedite this item if this is needed sooner rather than later.

Please let me know if you are interested by contacting [email protected].

wag110894 avatar Oct 30 '20 18:10 wag110894

Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

Tatsiana8 avatar Jan 31 '24 14:01 Tatsiana8

@Tatsiana8 @wag110894 please reopen the issue again, the bug is still reproducible: https://formio.github.io/formio.js/app/examples/select.html

but it works without formio: https://choices-js.github.io/Choices

istvan-szerletics avatar Mar 28 '24 10:03 istvan-szerletics

@lane-formio When do you think you could deal with the problem and solve it? It would be very important to us because of accessibility.

istvan-szerletics avatar Apr 03 '24 12:04 istvan-szerletics

We will be creating a new ticket as the original one referenced above was archived and we'll get it in for resource planning, but I can't guarantee it will be prioritized, so in that regard the response more or less is the same.

This item is currently in our backlog. We welcome a pull request or we have an option to expedite this item if this is needed sooner rather than later.

Please let me know if you are interested by contacting [email protected].

lane-formio avatar Apr 03 '24 13:04 lane-formio

@istvan-szerletics Can you add widget: "choicesjs" to the form definition and try again? image

lane-formio avatar May 08 '24 13:05 lane-formio

@lane-formio

We have already used "widget": "choicesjs" for every select, but it did not work. We also tried it without the "widget", and nothing changed. It is likely that "choicesjs" is the default.

Using "html5" made the select work and it was accessible, but our clients want to style the select themselves. With the default HTML5 select, our styling options are limited, and it lacks a search field. Therefore, we would like a solution that ChoicesJS offers.

We looked at the default NgForm Viewer. It is built with Angular and uses ChoicesJS. The select was accessible, and the bug where we lose focus when using the up or down arrow keys in the select was also resolved.

Could you tell us where to find the template for the select in Angular or how it is built?

Do you have any other ideas on how we can solve this problem? Have you made any progress with the bug?

This is very important to us, especially for people who use the select with the keyboard, as the ChoicesJS selects in Formio are currently not accessible.

istvan-szerletics avatar May 22 '24 14:05 istvan-szerletics

Internal ticket reference: FIO-8445

lane-formio avatar Jun 05 '24 14:06 lane-formio