Skip to content

Commit 0b1e7f5

Browse files
committed
Set aria-haspopup
1 parent 79ab6ff commit 0b1e7f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/combobox-nav.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function install(input: HTMLTextAreaElement | HTMLInputElement, list: HTM
1919
input.setAttribute('aria-controls', list.id)
2020
input.setAttribute('aria-expanded', 'false')
2121
input.setAttribute('aria-autocomplete', 'list')
22+
input.setAttribute('aria-haspopup', 'listbox')
2223
comboboxStates.set(input, {list, isComposing: false})
2324
}
2425

@@ -32,6 +33,7 @@ export function uninstall(input: HTMLTextAreaElement | HTMLInputElement): void {
3233
input.removeAttribute('aria-controls')
3334
input.removeAttribute('aria-expanded')
3435
input.removeAttribute('aria-autocomplete')
36+
input.removeAttribute('aria-haspopup')
3537
comboboxStates.delete(input)
3638
}
3739

0 commit comments

Comments
 (0)