-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Post author dropdown: add accessible search with debounced api request #7384
Comments
I talked to @marcysutton at JSCOnf EU after she gave her excellent talk "Empathy Driven Development". More details on Twitter: https://twitter.com/marcysutton/status/1002870300936032256. She recommended using autocomplete component for the use case we have. She mentioned that we should look at downshift which she helped to make fully accessible and see if it would fit. We can also find an alternative library or build our own based on the existing Dropdown. |
The closest demo to what we need from what I found: |
That’s great. It looks like it wasn’t that difficult to integrate. I anticipate it’s going to be more work to shape data layer in a way it’s optimized for the best UX than to build the control itself. |
Yes, the implementation was straightforward. We can alter the requests to include just the id and name and maybe slug for searching which is all we should really need. |
Noting that #7385 is where development for this is happening. |
Since #23237 has been fixed, can this be closed? |
Yep, closing. |
Is your feature request related to a problem? Please describe.
When a large number of users are available as post authors, the select element does not scale well. A select element with thousands of users is unwieldy, difficult to use and may even crash the browser on lower powered devices.
Describe the solution you'd like
When a large number of users are present, I would like to see Gutenberg use an accessible select element, such as that provided by https://github.com/alphagov/accessible-autocomplete. With a small number of users, we can probably stick to a regular select element. See #5921.
Describe alternatives you've considered
I tried an implementation using react-select (http://jedwatson.github.io/react-select/), but discovered it is not accessible. I also tried an implementation using the Gutenberg's built in autocomplete component, but discovered the use case is different enough that it would require a significant reworking.
The text was updated successfully, but these errors were encountered: