diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 3131c7b..56e6dbf 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -785,7 +785,7 @@ const Separator = React.forwardRef((props, forwa * All props are forwarded to the underyling `input` element. */ const Input = React.forwardRef((props, forwardedRef) => { - const { onValueChange, ...etc } = props + const { onValueChange, role = "combobox", ...etc } = props const isControlled = props.value != null const store = useStore() const search = useCmdk((state) => state.search) @@ -807,7 +807,7 @@ const Input = React.forwardRef((props, forwardedRe autoCorrect="off" spellCheck={false} aria-autocomplete="list" - role="combobox" + role={role} aria-expanded={true} aria-controls={context.listId} aria-labelledby={context.labelId}