-
Notifications
You must be signed in to change notification settings - Fork 26
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
Combobox Component (Single Select) #1088
Comments
Is there a similar way to accomplish this using the item definition list approach? As an aside, what is the value in supporting two ways to define the list? |
It's similar to how we support cauldron/packages/react/src/components/Select/index.tsx Lines 19 to 20 in b60588f
The general idea is if an author needs a simple list of label/value items they can use the list array. More advanced configurations could use the component to display more complex items. As an example, React Spectrum (Adobe) Combobox does something very similar.
Not unless we really think it's needed. I'm double checking with @dequelabs/cauldron-design on this, but my understanding is most cases will not need to be grouped so the list format will be the easiest to implement. |
This may already be planned (perhaps some prop types defined in the ticket would've cleared this up a bit) but I think the <ComboboxGroup label={<Icon type="bananas" /> Fruits}>
<ComboboxItem>Bananas</ComboboxItem>
<ComboboxItem>Mangos</ComboboxItem>
<ComboboxItem>Cucumbers (yes a cucumber is in fact a fruit)</ComboboxItem>
</ComboboxGroup> Due to the complicated nature of comboboxes (and historical UA/AT bugs surrounding comboboxes), it may be useful to clearly document which screen readers we will support for this (in both the ticket and demo/docs page for it). I would suggest latest VO, NVDA, and JAWS versions as our target support here but maybe that is something to consider more "globally" (on the cauldron readme/landing page of docs list what AT we support) |
Good callout, I can update the description.
There's already general guidelines here: https://cauldron.dequelabs.com/component-guidelines#accessibility |
Estimates: |
Question@scurker error message is being displayed even when selected an option from "Does this combobox have an error?" dropdown. Is this expected? or do we need to remove the error once the option is selected? TestingVerified UI and performed basic accessibility testing. Did not find any issues. Moving this to a11y column for accessibility testing. |
@Keerthi-Penukonda Yes, that's expected. Combobox/text fields are dependent on the author clearing the error once there's a valid selection made. |
Thanks @VaniChinnam, I've raised issues for the following:
For 1505022, it was an intentional design decision to allow for a user to easily filter down the list of options again if the user expanded the list again without being limited to options that were currently there. If the user types/remove characters the value does persist (or gets restored to its original value if no selections were made). I can ask @dequelabs/cauldron-design to see if we can get some usability testing here to see if this is something we want to tweak. |
Closing this ticket as we have separate tickets to track accessibility issues. |
Follow general ARIA practices guidelines: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
This implementation addresses only single select comboboxes.
List items can be provided via a child component,
ComboboxOption
:...or via a list with item definition:
The label provided for Combobox should be of type
ContentNode
to allow for additional values beyond strings:To allow for grouping of items, an additional
ComboboxGroup
component can be used to wrap combobox items:For the list of items and
ComboboxOption
, providing thevalue
property is optional and will reflect the value of the label associated with that item. Additionally, aselected
prop can be provided to both to indicate that item is currently selected.Under the hood:
<TextField />
(some different accommodations may need to be made to help support Combobox Component (Multiselect) #1103)disabled
,required
, etc.<OptionsMenuList>
to display the list of items#2
and#3
list items in the autocomplete section of the aria authoring practices)check
icon with a css ring to match the designonChange
handlersOther Notes:
Opening/closing the listbox has the following behaviors:
Examples:
The text was updated successfully, but these errors were encountered: