Skip to content
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 selector: use native <select> element for a small number of authors. #26077

Closed
adamsilverstein opened this issue Oct 13, 2020 · 5 comments · Fixed by #26426
Closed
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress

Comments

@adamsilverstein
Copy link
Member

adamsilverstein commented Oct 13, 2020

Is your feature request related to a problem? Please describe.
In #23237 we improved the post author selector by adding an accessible autocomplete searchable selector, building on the <ComboboxControl> component. This works especially well for a large number of possible authors when a select becomes unwieldy.

On the other hand, when a site has only a small number of potential post authors, a native select element similar to what we had previously would be better for users: simpler, even more consistently accessible, and faster. Worth noting that when sites have only one author, we don't show the selector at all.

Describe the solution you'd like
First: pick the number of users we want have be the "cutoff" when we start using the searchable select element vs the simpler native select element? Is it when we have 20 users, or 50 or more? Some design feedback would be useful here, and ideally some user studies, accessibility guidelines or other data. I couldn't find much in my brief search.

For sites that have [CUTOFF] or fewer fewer potential authors, show the same select element we were showing previously. Only show the new ComboboxControl when sites have more than [CUTOFF] authors.

As mentioned in #23237 (comment), #25267 (comment).

Questions
Should [CUTOFF] be developer controllable, and if so, how?

@adamsilverstein adamsilverstein added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. labels Oct 13, 2020
@adamsilverstein adamsilverstein self-assigned this Oct 13, 2020
@adamsilverstein
Copy link
Member Author

@youknowriad when working on this I have noticed that chrome tries to autofill the input field which interferes visually with the search feature of the ComboboxControl:

image

I think we can fix that by adding autocomplete="off" to the input field. What do you think?

@youknowriad
Copy link
Contributor

yes, it makes sense 👍

@adamsilverstein
Copy link
Member Author

yes, it makes sense 👍

Will address in a separate PR.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 23, 2020
@adamsilverstein adamsilverstein removed the Needs Design Feedback Needs general design feedback. label Oct 23, 2020
@adamsilverstein
Copy link
Member Author

@youknowriad Took a pass at addressing this in #26426 - the code is slightly complicated by the fact that we need to make sure we don't display a select when the combobox result count falls below the threshold.

@adamsilverstein
Copy link
Member Author

@youknowriad I addressed the autocomplete issue in #26427.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants