-
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
SelectControl: Add borderless prop #57720
Comments
It looks like that border is inherited from Not my area of expertise, but have we considered the potential accessibility implications of a borderless dropdown, especially for visually impaired users? (cc @andrewhayward ) |
It seems unlikely there would be a need for other controls to omit the border, largely because they lose their identity with out one. A borderless SelectControl can work (in theory) because most of the time the chevron will be present and this helps indicate the purpose of the element. Hopefully appropriate labelling, hover and focus styles can handle the accessibility requirements, but let's see what Andrew says. |
@mirka in terms of APIs, what do you think about adding a |
It is a possibility, but we should first assess whether the borderless style makes sense with all the available sizes/paddings, labeling options, |
The use cases that have arisen essentially call for a select with a smaller footprint and less visual prominence. So the likelihood of the options you mention being required is minimal. If that points to a 'facade component' then I think it could work. |
That's also a possibility. Do you think that component should live in |
Yes, I think it's pretty generic. We can keep it |
I think we can treat #58195 as a place to experiment with such a component's requirements, especially when striking the balance between minimal looks and accessibility. |
@jameskoster I'm working on this right now, and I have some important questions about the adaptive width. All the mockups for this borderless variant suggest that we want the select width to adapt to the width of the currently selected option.
|
This style variant is typically for cases where the select should be less visually prominent, so yes I think ideally the width of the resting state should 'hug' the chosen value. It's probably important from an a11y standpoint too... if the chevron is too far from the value then the nature of the control is less obvious. Perhaps we start with
I would say so, yes.
I can't think of a situation where we would right now. |
Slightly unrelated, but should we have a |
I was considering keeping the border a separate boolean if we're going to allow "à la carte" styling with the width hugging, but since we're going to couple the borderless styles with width styles, I think it's better to do |
As noted in #57670, a couple of UI concepts in the data views work call for a SelectControl with reduced visual prominence. Two examples are; operator selection in filter configuration, and the page selector in pagination:
We can get halfway there by using the
small
size, but it would be good to have a built-in way to hide the border as well.The text was updated successfully, but these errors were encountered: