feat(a11y/combosearch): add aria-ownws props
However it may be redundant due to aria-controls presence. Cf #8643
This commit is contained in:
parent
07579c9a58
commit
acffd45a22
1 changed files with 3 additions and 1 deletions
|
@ -158,6 +158,7 @@ function ComboSearch<Result>({
|
|||
}, [results.length, isSuccess]);
|
||||
|
||||
const initInstrId = useId();
|
||||
const resultsId = useId();
|
||||
|
||||
return (
|
||||
<Combobox onSelect={handleOnSelect}>
|
||||
|
@ -169,9 +170,10 @@ function ComboSearch<Result>({
|
|||
autocomplete={false}
|
||||
id={id}
|
||||
aria-describedby={describedby ?? initInstrId}
|
||||
aria-owns={resultsId}
|
||||
/>
|
||||
{isSuccess && (
|
||||
<ComboboxPopover className="shadow-popup">
|
||||
<ComboboxPopover id={resultsId} className="shadow-popup">
|
||||
{results.length > 0 ? (
|
||||
<ComboboxList>
|
||||
{results.map((result, index) => {
|
||||
|
|
Loading…
Reference in a new issue