diff --git a/README.md b/README.md index a367a59..07fb48d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ import { focusTrapBehavior } from 'https://unpkg.com/@chialab/loock?module'; import { focusTrapBehavior } from '@chialab/loock'; const dialog = document.getElementById('.dialog'); -const trap = focusTrapBehavior(dialog); +const trap = focusTrapBehavior(dialog, { + inert: true, +}); dialog.addEventListener('open', () => { trap.connect(); @@ -55,6 +57,12 @@ dialog.addEventListener('open', () => { ### Options +#### `elements` + +An array of nodes or a function that returns an array of nodes to use as tabbable elements. + +Default: `undefined`. + #### `include` A list of selectors of tabbable elements to include in the context.