Skip to content

Commit 42d1546

Browse files
committed
Update README
1 parent c77e92d commit 42d1546

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,26 @@ $ npm install @github/combobox-nav
2525
</ul>
2626
```
2727

28-
`combobox-nav` will set most of the necessary ARIA attributes on the elements at time of installation. However, since it does not control list visibility, please [refer to the ARIA spec](https://www.w3.org/TR/wai-aria-1.2/#combobox) for more requirements around `aria-expanded` and `aria-autocomplete`.
29-
3028
### JS
3129

3230
```js
33-
import {clearSelection, install, navigate, uninstall} from '@github/combobox-nav'
31+
import {clearSelection, install, navigate, start, stop, uninstall} from '@github/combobox-nav'
3432
const input = document.querySelector('#robot-input')
3533
const list = document.querySelector('#list-id')
3634

37-
// To install this behavior
35+
// To install combobox pattern on a given input and listbox
3836
install(input, list)
37+
// To start intercepting keyboard events for navigation
38+
start(input)
39+
// To stop intercepting keyboard events for navigation
40+
stop(input)
41+
3942
// To move selection to the nth+1 item in the list
4043
navigate(input, list, 1)
41-
// To clear selection
44+
// To reset selection
4245
clearSelection(input, list)
43-
// To uninstall this behavior
44-
uninstall(input, list)
46+
// To uninstall combobox pattern from the input
47+
uninstall(input)
4548
```
4649

4750
## Events

0 commit comments

Comments
 (0)